refactor mongo.js