Finished Chapter 4 Exercise 7