added mask for tasking function