rework refresh script