homework 3 - add solution to p1 and p5