adding initial viterbi stuff