Finished homework 7