added hmm prototype