fixing chapter 5