updated method name generateRandomId to generateUniqueId