Macy’s plans to close 100 of its 675 department stores following a drop in its profitability. It will use some of those resources to double down on its digital operations and on its best-performing stores reports CMS Wire.

Macy’s estimates the annual sales volume it would lose from these 100 stores combined is roughly $1 billion after factoring the revenue it expects to retain due to nearby stores and the web.

During the fiscal second quarter, Macy’s comparable sales fell 2%, aided by the closing of 41 underperforming stores. Retail Metrics had been forecasting a 4.4% decline in comparable sales.

“Whenever there’s been a setback in our company, we’ve been first in the industry to take a very aggressive stance at moving us forward,” CEO Terry Lundgren told CNBC’s “Squawk Box.” “That’s just part of it. By closing 100 stores… we’re getting out in front of this.”

Nearly all the stores are cash-flow positive, but “their volume and profitability in most cases have been declining steadily in recent years,” said Macy’s President Jeff Gennette, who will assume the CEO role from Lundgren in 2017.

This follows Walmart’s announcement to close 269 stores, with 154 in the US. Walmart is still willing to invest in 300 new stores in strategic markets — but it is determined to crack the online sales nut by investing $3.3 billion to acquire Jet.com.

Read “The Impending Death of Traditional Retailers”

A version of this article appeared in CMS Wire and CNBC on August 11. Read the full versions here and here.