Walmart’s (wmt, +0.02%) turnaround is gaining speeding thanks to its massive investments in recent years to overhaul its e-commerce and upgrade thousands of its U.S. stores’ grocery business.

The discount chain, which is the world’s largest company, reported on Thursday that comparable sales at its namesake U.S. stores rose 2.7% in the third quarter, their 13th straight period of growth. And more crucially for any retailer competing with (amzn, -0.19%), the chain got more shoppers to come for a visit. Online revenue in the U.S. rose 50%.

The strong numbers in the U.S., where Wal-Mart Stores gets nearly 60% of revenues, sent shares up 3% in premarket trading and raised confidence in its prospects as it heads into the peak of the holiday season.

Read: Walmart Is Putting Shelf-Scanning Robots in Over 50 U.S. Stores

“Across almost all categories, we’re seeing growth. The food business, in particular, has accelerated,” Wal-Mart Stores CEO Doug Macmillon said of the U.S. performance. Sam’s Club, Walmart’s sister chain, continued its recovery with a 2.8% increase…