Finished question 5 of homework