Adding solution to homework 1 week 3