fixing and renaming snr masking function