Canonical calculation break ties using IDs