baseline viterbi with bugs