Changed Viterbi to also return prob. distributions