hw5 p1 and p2