Done exercises from chapter 3