refactoring handlebars_helpers