Implements full functionality with mongoDB