refined syntax for masking. experiment for compilation added.