finish exercises from chapter 6