Added code for Chapter 12 and Chapter 13