add code snippet for start of Chapter 3