patcher code