renamed comparison function