Done exercises from chapter 8