Added a random generator and a seed