begin database refactoring with mongoose