add comparator to search