refactored to use callbacks and MongoClient in Controllers