added chapter 2 as 6 for starting point
chapter 6 code