Added uniqueId generator function