move sort to search