making the filter work with the table