Added the communication with MongoDB database