added mongo support and tests