Revamp the filtering scheme