updated for chapter 8