added onUnMask postprocessing function #351