making RNG public, to allow fixing random seed