added mongodb support
bug fix