Finished mongoDB implementation