Changed gradient comparator