Small changes to HMM