Implemented viterbi algorithm need to work out what to do with output