chapter 8. still working on 8.12