completed chapter 2 exercises - formatting