HMM first working