sorted updating