properly solved p2