Completed exercises for chapter 8