update sorting stuff