Added masking functionality to filter.