Function makeDeterministic