HMM set up.