add mongodb functionality