testing the afterFilterfunction