Chapter 10 example code.