updated to use MongoClient to connect