Sorting out search input