Replace random generator