add functionality to update name of server; refactor refresh function