my solution to PA2