Viterbi decoding, need to be tested