Added randomness option