used MongoClient instead of Mongo and added defaultOptions with version check