all exercises and examples for chapter 4