using RandStream instead of rng