Code examples from Chapter 16