Completed chapter 5 exercises