function definitions for TransitionProbability