finished question 1 of homework 3