Add sample code for chapter 17.3