fixes in chapter 4