Added mongodb functionality