fixed error in chapter 6