got rid of unnecessary function 'viterbiStep'