refactor into private updateServerFromUri