The 12-country Trans-Pacific Partnership (TPP) has become an unexpected lightning rod this campaign season. This important new trade agreement has prompted heated exchanges between U.S. presidential candidates and provoked infighting among Democratic and Republican party-platform writers. There’s even a multi-act music tour to protest the agreement.

Criticism of the TPP comes from strange political bedfellows, ranging from Bernie Sanders, who has called the TPP “disastrous,” to Donald Trump, who consistently refers to it as “a terrible deal.” Congressional critics like Senate Finance Committee Chairman Orrin Hatch express similar concerns “that the administration may have missed a pivotal opportunity with the TPP to get the best deal possible for the American people.”

By contrast, President Obama has lobbied repeatedly for the agreement — touting it in interviews, speeches, and op-eds. He calls the TPP a “new type of trade deal” that will give the United States “a leg up on our economic competitors.” Not surprisingly, political leaders from New Zealand, Canada, Japan and other TPP signatories also claim the new agreement is a good deal for their countries.

Is the TPP really a “good deal” for the United States?

We tackle this question head-on in a recently published paper, finding that the TPP trade rules are skewed heavily in favor of the United States. Our primary discovery is that much of the language in the actual TPP agreement is copy-pasted verbatim from earlier U.S. trade agreements. This is particularly true for controversial issues like investment, where up to 90 percent of the text from past U.S. investment chapters is inserted word-for-word into the TPP text. These findings call into question critics’ claims that U.S. negotiators failed to adequately represent U.S. interests in the TPP.

The text of the secretly negotiated TPP was released to the public last November after nearly a decade of opaque negotiations. At more than 2,700 pages, few if any have read the entire agreement. We admit we’ve not read this entire document either, but we have analyzed its complete contents — quite literally.

Using computational techniques similar to those used in commercial plagiarism detection software, we compare the TPP to all of the trade agreements its dozen members have signed since 1995. The language in each country’s previous trade agreements provides useful insights into what negotiators push to include in subsequent agreements like the TPP. Therefore, our research seeks to demonstrate who “wrote the rules” in the TPP by analyzing the amount of overlap between the language in the TPP and the language in each member’s earlier trade agreements.

Trade agreements like the TPP are often evaluated in terms of their anticipated economic effects. But the primary motivation for the TPP appears to be as much political as it is economic. Because global trade cooperation via the World Trade Organization remains stalled, the rules in the “mega regional” TPP could become the new standards for regulating global trade.

President Obama has consistently emphasized this “rule-writing” motivation. In a brief interview with the Wall Street Journal, he evoked the word “rules” no fewer than 11 times! His specific rationale is geopolitical: “[T]he TPP means that America will write the rules of the road in the 21st century … if America doesn’t write those rules then countries like China will.”

Two revelations motivate our study:

1. Participating governments brought very different templates to the TPP bargaining table. We initially compared the overlap among all TPP members’ earlier trade agreements and found surprisingly little content overlap between previous American, Australian, Japanese, Mexican, Vietnamese, or Peruvian agreements, among others — and their past bilateral agreements with China are even more dissimilar. Thus it is clear that U.S. negotiators prefer a distinct set of trade rules that they hope to advance through deals like the TPP.

2. Trade agreements are rarely drafted from scratch. Instead they are heavily copied and pasted from preexisting templates, which can have unexpected and sometimes negative consequences. The TPP is lengthy and thus some of it is unique, yet large sections were taken verbatim from earlier trade agreements.

We demonstrate that earlier U.S. agreements served as the dominant template for the TPP.

U.S. agreement language is much more prevalent in the TPP than language from Australian agreements — which ranks second — and far more dominant than language from Japan and Mexico, both major global players in trade policy.

The 10 trade agreements that most closely mirror the TPP are all U.S. agreements, including bilateral U.S. trade treaties with countries in Latin America, Africa, Asia and the Middle East. For example, half or more of the language in U.S. trade agreements with South Korea, Panama and Bahrain (which themselves overlap heavily with one another) is replicated word-for-word in the TPP. Public Citizen has called the TPP “NAFTA on steroids,” but it is these newer U.S. agreements with individual countries that form the basis of the TPP.

Our methodology looked for a minimum of six identical consecutive words to constitute copied language, but in reality we found entire paragraphs in the TPP lifted word-for-word from U.S. agreements. Trade agreements are lengthy, so this amounts to tens of thousands of words in the TPP agreement being copied verbatim from past U.S. bilateral agreements.

Moreover, the U.S. imprint tends to be greatest on the most salient issues. For example, a 2013 Congressional Research Service report on the TPP identified general services and financial services as among the areas of greatest U.S. interest. Perhaps not surprisingly, these are the topics on which two-thirds or more of existing U.S. trade language was copied verbatim into the parallel sections of the TPP.

Investment is perhaps the most important, and certainly the most controversial, topic in the TPP — and the one where we see greatest U.S. dominance. As discussed here in the Monkey Cage, various organizations and politicians have heavily criticized U.S.-supported investment-treaty rules that allow multinational corporations to pursue claims against foreign governments through international arbitration.

Lo and behold, the TPP investment chapter has U.S. fingerprints all over it. Our analysis shows that, on average, around 80 percent of the language in earlier U.S. investment chapters is inserted into the TPP. Ninety percent of the investment chapter in the U.S.-Oman trade agreement, for instance, can be found word-for-word in the TPP’s investment chapter. So those critical of investment rules in past U.S. agreements would probably be critical of the TPP’s investment chapter — the language is essentially the same.

These revelations about widespread copy-pasting do not necessarily mean the TPP is unquestionably positive for the United States. One’s (re-)assessment likely depends on how one views the earlier U.S. agreements that are now embedded in the TPP as well as globalization in general.

But it now seems difficult to claim that the U.S. performed poorly in the TPP negotiations, since much of its preferred language was inserted into the landmark new agreement by virtue of a few simple keystrokes.

Todd Allee is assistant professor of government and politics at the University of Maryland. Andrew Lugg is a PhD candidate in the Department of Government and Politics at the University of Maryland.