Refactoring for the masking of data to send