uniqueId computation