improvement to filter logic thats safer and less restrictive