Chapter 1 code listings