added sorting to search results