HMM initial prototype