chapter3
some work on chapter 1 and 2