update sorting rules