Finished chapter 6 exercises