finished chapter 9.6 exercises