Added a viterbi algorithm ffor the hell of it