changed masking around a bit