modified mongo_connect.js