New filter function.