Implemented 'patchDelta' function