Filtering the input collection