corrected the filter callback