Added a seed function for random number generator to allow for replication of experiments.