Walmart wmt said on Thursday it would slow the pace of new store openings to better shift its focus on building up its online muscle, improve its existing stores and invest in tech.

The discount retailer, which operates about 4,500 U.S. stores, outlined its plans to Wall Street analysts for continuing to improve its results in the coming years. Last quarter, Walmart’s U.S. comparable sales rose 1.6% (handily beating rival Target tgt ), rising for the eighth straight quarter. But it facing aggressive competitors online and offline, and Walmart has been aggressive about cutting prices to fend them off.

Yet Walmart’s $14 billion a year e-commerce business is barely one-sixth the size of’s amzn , adding to the pressure on Walmart. (Last month, Walmart closed on its $3 billion buyout of fast online retailer to beef up its e-commerce.)

But the heavy investments will take a toll on profit growth: Walmart said it expects capital expenditure plan to hit $11 billion next fiscal year, and anticipates its fiscal 2018 earnings per share to be unchanged from the current year’s. The retailer then expects that metric to grow 5% the following year.

“This company over time will look like an e-commerce company,” Chief Executive Officer Doug McMillon told investors gathered at Walmart’s headquarters in Bentonville, Arkansas. He expects online sales to rise 20-30% in the second half of this year, well above the 11.6% growth last quarter.

Walmart has worked hard to keep pace with Amazon. It has recently vastly expanded its online marketplace and is offering curbside grocery pickup in more and more markets. This year it also launched a mobile payment app. The company has also spent $2.7 billion on wage hikes in the last two fiscal years to improve customer service and motivate workers at a time their work is more complex.

Earlier this year, Walmart shuttered its 153 small-store Walmart Express format. It will now moderate the pace of new openings. Walmart said it now plans to open 130 U.S. stores this year, less than the 135 to 155 new stores it had forecast previously. (That compares to 230 last year. ) And then it will really drop off next year, when Walmart anticipates opening only 55 stores.