saving processes in mongoDB