first commit
extract method
rename variables
move method
replace temp with query
again, extract method
replace loop with collection closure method
replace conditional with polymorphism
replace type code with State/Strategy
implement State pattern