improve mongodb support