add the implementation to connect to the mongodb.