coffescript refactoring pt.1