Doing the exercises from chapter 7