change refresh function
changed refresh function.