modify or add some mask into tensor and hardi tasks