Recursive HMM working