implement mask renaming