update batch viterbi, not yet perf enough