Finished homework 5 minus problem 4