Implemented non-recursive p2