improve random number generation