Adding chapter 10 code