ch 8 table of contents refactored with simulated index of array