updated mongoose.js