rearranged viterbi inputs and added defaults