Chapter 04 example code