PIC masking functions