transform search algorithm works ok