added hidden markov model