Added Chapter 3 and Chapter 4 code