Finish exercises from chapter 3