As some types of manufacturing disappear in America—manual jobs that can be performed in places like Mexico where there are lower wages, and repetitive ones that can be automated—other types are growing. So-called advanced manufacturing, which is highly specialized and requires a facility with computers, is actually expanding. The U.S. economy will need to fill 3.5 million skilled manufacturing jobs over the next decade, the White House says. This is an industry that employs skilled and educated workers such as engineers and scientists. It’s also an industry that adds significant value to the economy. Manufacturing output continues to rise in the U.S., and the average factory worker makes $180,000 worth of goods every year, more than three times what he produced in 1978.

“The mantra that we’ve lost good-paying jobs to China is exactly wrong,” said Michael Hicks, an economics professor at Ball State University who has studied manufacturing in Indiana. “We’ve lost the bad-paying jobs to China and gained good-paying jobs.”

Of course, the U.S. has lost 5 million manufacturing jobs since 2000, and those losses have reverberated across the country. The scale of those losses has overshadowed areas of growth—but there has been growth. For example, the number of workers employed manufacturing medical equipment and supplies has grown eight percent over the last two decades, according to the Bureau of Labor Statistics, even as overall manufacturing employment has fallen 28 percent over that same time period.

Indeed, manufacturing job losses have been concentrated in lower-pay, lower-skill jobs, said Hicks. Since 2000, jobs in manufacturing for people with graduate degrees have grown by 32 percent. While manufacturing jobs for people with less than a high-school education fell 44 percent between 2000 and 2013, those for people with an associate degrees in academic fields rose 17 percent, according to the Congressional Research Service.

That’s because in the last decade, as manufacturing companies faced intense competition from overseas, they invested in equipment and technology that made their plants more efficient and specialized, Hicks said. That meant that thousands of jobs were automated, but also that new jobs were created for people who worked with machines in the manufacturing process. This increased specialization is exactly what economic theory predicts would happen as trade advances, Hicks said. A concept known as comparative advantage suggests that countries should use their assets to specialize—to make what they make best. Because of comparatively low costs of labor in countries such as China and Mexico, those countries specialize in making the kinds of goods that require a lot of labor but not as much technology and skill. For the United States, the result is the opposite: Its advantage is the kind of high-cost, high-skilled manufacturing that capitalizes on the country’s technology and educated labor pool. “Our comparative advantage would be towards more sophisticated production,” Hicks said.