implementing logic to generate a tracking id with uniqueness property