changing method name from apply_patch to applyPatch