Added chapter 4

chapter 4 examples