finished chapter 3 exercises