add mongodb support, and test