added chapter 17 code w/error