Added deterministic option.