Proj2 solve implemented iteratively

Needs debugging