assignment 3, question 2 complete