some refactoring to begin with backbone