Changed uniqueRandomInts to use a nested function