Added method processFilter to remove redundancy