Added code for Chapter 17