updating the connection to mongo