basic infrastructure for a rng