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 + ((-3/8)*(h.* k1))+((5/8)*(h.* k2)),tt);
k4 = fun(y + ((335/162)*(h.* k1))+((-140/81)*(h.* k2))+((40/81)*(h.* k3)),tt);
y_k = y + ((-11/15).*h.*k1)+((-11/6).*h.*k2)+((8/3).*h.*k3)+((9/10).*h.*k4);

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