update lib/mongo.js