Added fuctions to insert data into MongoDB