Finished question 2 of HW1