correct filter logic