added mongoDB functions