Week 3 Homework 1 solution