finished exercises for chapter 4