using better random number generator