named annonymous functions, complied with IntelliJ code inspections
fix updating of ace type
It appears MongoClient.connect only needs to called once