patching code