completed and updated chapter 3 exercises - formatting