Generate the correct filtering functions instead of filter.