finished exercises from Chapter 5