Finished chapter 7 and 8 exercises