In the competition for jobs between U.S. workers and developing world workers, American workers are losing, and the TPP, which the Obama administration touts as being pro-labor, is, like NAFTA, anything but. Under the TPP, signatories will be required “to have laws governing minimum wages, hours of work, and occupational safety and health,” but the level of the minimum wage and any other standard is left entirely to each country to determine on its own.

This is perhaps why Hillary Clinton now says TPP will not help American workers. But this raises the question of what can be done. Trump would slap a 35 percent tariff on goods imported from Mexico, while Bernie Sanders would “develop trade policies which demand that American corporations create jobs here, and not abroad.”

But the reason Third World workers get such a large share of jobs is because their wages are low. Third World countries export so much of what they produce because their workers cannot afford to buy these goods themselves. Handicapping them will only drive their wages lower, making them even more attractive to foreign corporations.

Is which group of workers to hurt, the only choice? Is there no trade policy that can help all workers at the same time? There is.

Wages in the Third World are low because production requires technology, which Third World countries do not possess. Why are Third World countries so technology poor? In Why Nations Fail economists Daron Acemoglu and James Robinson attribute this backwardness to the existence of powerful elites who grab for themselves the fruits of any advances that innovative and entrepreneurial individuals would make. This situation changed dramatically in China after Deng Xiaoping came to power in 1978 and it also changed in India after the economic liberalization of 1991.

But catching up with the technological capabilities of the developed world in countries with very large and very poor populations takes time. Lacking the technology to keep many of their workers employed in home-grown industries, these countries submit them to exploitation by the foreign corporations who do own the necessary technologies. These terms of trade are precisely what should be changed.

Patents should be sold in Third World counties at prices that local entrepreneurs can afford, and the duration of these patents should be significantly shortened. In return, Third World countries should be required to pass and enforce high minimum wage laws and labor-friendly collective bargaining mandates (aka “co-determination”). This would make almost all production local: Apple phones for Third World countries would be produced in those same countries, and for the U.S. market they would be produced in the U.S. Instead of fighting one another for jobs, workers would be able to unite in fighting for better working conditions everywhere.

To the general public, the enforcement of patents is presented as being in the U.S. national interest, because the patents are owned by U.S. corporations. But the U.S. public and U.S. corporations are of course not one and the same. It is the American people who, through their government, grant patents; the American people therefore ought to have the right to determine the conditions under which these grants occur. Patent laws should be used in order to enhance their well-being instead of lining the pockets of a few.

To get a sense of the importance of technology transfers to production, consider the fate of the Swedish automaker Saab. In 2010 General Motors, which had owned Saab since 2000, sold it to a Dutch company, Spyker, but General Motors retained veto power over the resale of the Saab patents. Spyker then purchased Saab in the midst of the Great Recession, a time when the banks were not making any loans. As a result, Spyker, which needed loans to operate, was never able to take control of the company. A Chinese auto manufacturer wanted to buy Saab both in order to continue production in Sweden, but also in order to start production in China. General Motors did not want to face an additional competitor in China, and refused to let Spyker transfer the patents. Of course, had the Chinese buyer paid General Motors for its consent the deal would have gone through, but the price was apparently too high. The upshot? Saab closed its doors and thousands of jobs were immediately lost in Sweden, and at the same time potential jobs were lost in China.

Low prices for patents would benefit U.S. workers because they would mean that many entrepreneurs would be able to enter each and every industry in the Third World, and all of these entrepreneurs would be competing for employees. The prohibitively high prices for patents that exist today turn corporations into oligopolists in the product market, and powerful employers (monopsonists) in the labor market.

Of course there are those who would argue that without very high profits, there would be fewer inventions. But this argument is simply not true. Economists Michele Boldrin and David Levine have done research that shows major inventions occur—and their use spreads—long before there is even the possibility of granting them patents, because in the early stages it is usually not known how to patent them. In fact, economists George Haley and Usha Haley discovered that patent laws actually curtail further developments because owners of existing patents stand in the way.

Trump has focused our attention on a yet non-existing wall along our southern border. But far more problematic are the walls that exist around technology, because they transfer income from workers around the world to corporations and are one of the main reasons for the unprecendented economic polarization around the world. What we need are agreements that swap access to technology for laws that would guarantee high wages everywhere.