Chapter 7 exercise