added parallel support for the masking of data