Update HMM.cpp