improve random number generator