Updated Chapter 3 Exercise 7