Added code examples from Chapter 12