Working Viterbi