HMM model modified