set_rng method