a snippet of https://github.com/compwron/refactoringExercise inspired by http://patrickwilsonwelsh.com/?p=18