function [YNew,counter,residual] = IMPLICIT(y,h,tolerance,tt) 
% 
% k1 = fixed_point(y,h);
% 
% YNew = k1;

error = 5;
coutner = 0;

%% Explicit Predictor

y_k = y + (h.*fun(y,tt));

%% Implicit Corrector Step
counter = 0;
while error >=tolerance
    y_2 = y + (h.*fun(y_k,tt));
    if counter == 0
        residual = norm(y_2-y_k);
    end
    error_vector = abs(y_2-y_k);
    error = norm(error_vector);
    counter = counter + 1;
    y_k = y_2;
end

YNew = y_2;
    
  