node filter logic