added Petris for HMMs