changes to random generator