removed second random generator