added mongoDB functionality