Fixed chapter 11 Exercise 7