called filter at the right moment