Replace rng() with StdRng