fixing up chapter 10 examples a bit