refactoring things to backbone