prog 227 - unrefactored, last 3 plans not starting at 0