added random generator