more flexible design, TODO implement Viterbi search in IBM1 and HMM