Revert "Revert "added mongodb changes""

This reverts commit 4685e49d23c6bb329cb9629dbf09152eeacf7003.