Finished chapter 9 exercises