Chapter 9 initial code.