Some code for Chapter 1.