While the retail apocalypse has resulted in store-closures and layoffs of tens of thousands of workers in recent months, men have fared far better than women in the job market.

At the same time that women are being driven out of traditional retail jobs in bricks and mortar stores, men have been claiming the lion’s shareof new e-commerce positions.

In 2017 alone, J.C. Penney, Macy’s and Sears each announced more than 100 store closures, according to separate company statements. Macy’s estimated that closings would lay-off more than 10,000 workers, cutting approximately 7 percent of its’ work-force. J.C. Penney estimated they would lay-off 5,500 workers.

“Our main finding is that women have lost jobs in retail trades, while men gained them,” Emma Williams-Baron, policy and data analyst at the Institute for Women’s Policy Research, said in an interview. “Specifically, women lost about 129,000 jobs, while men gained 106,000.”

So how is it possible that while department stores are failing and women are losing jobs, men have gained over 100,000 in the same industry? Largely due to e-commerce – which has created over 355,000 new jobs since 2007.

While women make up the vast majority of those in the retail salesforce, in e-commerce, men hold over half of the jobs, according to the Bureau of Labor Statistics data.

Williams-Baron suggests this could be a result of “occupational segregation,” or a set of circumstances that give men a distinct advantage over women. She said men may simply have a better network of contacts and knowledge about e-commerce job openings than women, or may fit the gender stereotype of who works in an e-commerce setting.

“E-commerce jobs, including warehouse, shipping and distribution, and computer support roles, might strike people as jobs for men more than for women, affecting who hears about openings, who wants to apply, and who gets hired,” Williams-Baron said. She added that not enough research has been done to conclude why more men were getting hired for e-commerce jobs than women.

Williams-Baron also said that within retail trades, women lost the most jobs in general merchandise stores.

“This is an area that might be particularly vulnerable to changes in e-commerce, automation of common cashier and other tasks, and an area where women and men may be segregated with men more likely to be selling things like appliances or furniture, which may be more protected from e-commerce sales,” she said.

Aside from the job opportunities, E-commerce tends to provide better paying jobs than are offered in traditional retail sales. The average e-commerce worker earns $17.41 per hour while the typical retail worker earns $13.83 per hour.