finish viterbi step 2.