Completed chapter 3 exercises