broke down the big fat method into smaller sub-routines