More book exercise. now at chapter 2.