Chapter 1 sample code.