refactored updateTransitionProbs