HMM update