save the rng internal state