updated pseudocode for masking