First attempt Viterbi Alg