sorting and search proper