Updated to support a deterministic mode