fixes error in chapter 3