fix variable names in viterbi
more work on viterbi