update mongodb connection