filter a given element