fast HMM