add hmm class.