Doing some exercises for chapter 9