apply filter properly