Masking logic implemented