added options for randomness