corrected error on masking (needed parentheses)