change to HMM