finished chapter 1 examples and exercises