Code examples for Chapter 9