Filtering logic work in progress