changed random number generation
changes in random number generation