Added Chapter 7 code