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

error = 5;
counter = 0;

%% Explicit Predictor using Kutta's Method

k1 = fun(y,tt);
k2 = fun(y + (1/2)*(h.* k1),tt);
k3 = fun(y + ((-1/6)*(h.* k1))+((2/3)*(h.* k2)),tt);
y_k = y + ((0).*h.*k1)+((1/4).*h.*k2)+((3/4).*h.*k3);

%% Implicit Corrector Step
counter = 0;
while error >= tolerance
    y_2 = y + ((1)*(h.*fun(((1/2).*y)+((1/2).*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;
    
  