a random number generator (should also work on windows, but not yet
tested there.