Changed to iterative solution