Finished question 2 of Homework 6