imported chapter 15 example code