added some functions to store/load data from mongoDB