Added Mongo logic.