modified MongoDBConnector