changed to faster prng, generalized Randomarrow