changes about refresh function