ch3 - adjusting pseudo-code