Made seed a parameter for flexibility