work on algorihms for extended HMMs