Chapter 9 first exercise