generateUniqueName actually does what it says