tweaked comparator