added p2 iterative