update sorting and searching