Sample code for Chapter 16