Finished homework 5