finished exercises from chapter 1