all updates for doing the patching with optional 'MASK'ing of data