add sorting for search result