finished chapter 6 exercises