added support to save and get data from the mongo database.