refactored filter selection