sorting the search test problem