refactored filter spec