Adding proper random number generator