Finished chapter 8 exercises