Update HMM.R