Working iterative method in lab3