- re-implemented rng