advance mongo support and fixes

advance mongo support and fixes