Write more deterministic code