slight improvement of hmm