refactored chance node next state randomizer.