* fixing an indexing bug in viterbi