Make Delta and Mask as a method

to call it ONCE