Changes mongo function