added a solution to p3 parts 1&2