change to Dict + HMM filter