random numbers generation fixed