Changing the abstract function to perform the filter.