emulating JS masking