add before filter for terms