new function: setMasking