Added comparator for the Gradient based on nodeId as a utility value