algorithms, restructuring, starting out with criterion