changing viterbi to include several models