mongo support and some tests