Finish exercises from chapter 6