added deterministic randomness