remove nondeterminism