hmm code