modified masking functions to generate new clipped features