updated mongoose.js and added mongoose dependency to package.json