Completed Chapter 7: Exercise 12