Added sample codes for chapter 17.6