Week 2: problem 1 & 2 solutions