changed the random number generator to sequential generator