more filter logic (still untested)