finish exercises from chapter 5