JCPenney (JCP) on Friday said it will shutter 130 to 140 stores and close two distribution facilities in an effort to reinvent itself online, cut dead weight at underperforming physical locations, and better optimize its remaining bricks-and-mortar locations.

Sales at stores open at least a year, a key metric for retailers, slid 0.7% during the fourth quarter (including the key holiday season), which compared to a 4.1% bump during the same period the year prior, the company announced during its earnings release on Friday. Penney said it expects comparable-store sales to be between -1% and 1% in 2017.

With the need to eliminate staff through the store closures, the company also announced a voluntary early retirement program for about 6,000 eligible workers. The company’s chairman and CEO Marvin Ellison said he expects the number of full-time associates opting to take the incentive will exceed the number of full-time positions impacted by the closures.

“We believe closing stores will allow us to adjust our business to effectively compete against the growing threat of online retailers,” he said in a statement. “We believe the future winners in retail will be the companies that can create a frictionless interaction between stores and e-commerce while leveraging physical locations to minimize growing operational costs of delivery.”

The closures announced Friday represent about 14% of the company’s overall store portfolio that produces 5% of total annual sales. Shares of the struggling department-store chain, which have been beaten down more than 17% so far this year, sunk as much as 9.6%  — to a new 52-week low — on the heels of the announcement before rebounding slightly. Penney also said Friday it turned an annual profit for the first time in six years.

By moving more focus to online channels (where Penney saw double-digit sales growth in the fourth quarter), and thinking about physical stores not just as showrooms but distribution hubs as well, the company believes it can bring more shoppers to its brand. Ellison said that’s why buy-online, pick-up-in-store options have been effective: It offers shoppers the in-store and online experiences at the same time, while also helping to cut down on shipping time for online-only consumers.

To Ellison’s point on better coordinating the retailer’s overall online and at-store strategy, about 75% of all Penney’s online orders touched a physical store last year.

Retail Fights to Survive as Consumers Move Online

Penney is not alone in its struggle to grow its business and retain customers. It joins a growing list of retailers that have announced store closures after a difficult holiday season. Last year, Macy’s (M) revealed plans to close 100 stores, while Sears (SHLD), and Kmart also shrink their footprint, and others including The Limited and American Apparel have declared bankruptcy.

Traditional bricks-and-mortar retailers have struggled to lure customers into their physical stores as they face stiff competition from e-commerce and off-price counterparts like Amazon (AMZN) and TJMaxx and Marshall’s parent company TJX (TJX), which can often entice shoppers with same products at lower prices. This week, TJX announced it plans to increase its store count by about 50% Opens a New Window. as shoppers cheer the “treasure hunt” experience browsing the chain’s aisles can bring.

In addition to its continued focus on e-commerce, Penney said it will also focus on more diversified regional pricing, home furnishing offerings and streamlining to ease inventory burdens, which lead to more promotional offerings to move items out of the store.

In the fourth quarter, JCPenney booked a profit of $192 million, or 61 cents per share, compared with a $131 million loss during the final quarter of 2015. Adjusted earnings per share, which excludes certain items, came in at 64 cents for the quarter. Sales, meanwhile, came in at $3.61 billion, which missed Wall Street forecasts for $3.98 billion.