Viterbi algorithm implementation added