rationalize code up through chapter 5
make all subsequent to c5f8d4905a923566bb7bc656596c8f30f9446028