Added Chapter 10 code