new better rng and libification