add indexOf errors for Chapter 6