issue: implemented connected_hmm : viterbi decoding

issue: refine logic, improve code quality