Chapter 8 Initial code.