converted to coffee... easier while refactoring