added patching support