making term-filtering work