Completed chapter 6 exercises