refactors filter evaluation