Walmart wmt appears to have a bit of wind in its sails again.

The discount retailer, which recently reported its eighth straight quarter of comparable sales growth in United States, handily beating rivals like Target tgt and Macy’s m . And Walmart even managed to show a re-acceleration in its e-commerce growth, the pace of which had slipped for nine straight quarters until last quarter, when they jumped 12%.

Yet despite that progress, Walmart remains very far behind arch-rival, amzn with annual online sales of $14 billion, good enough to be #2 but only about one-sixth of its largest competitor’s.

Last week, Wal-Mart Stores CEO Doug McMillon told Wall Street analysts that e-commerce growth could rise back up to the 20% to 30% range thanks its many initiatives, which range from expanding the assortment available on to having grocery pick up at hundreds more stores. And a few weeks ago, Walmart bought a small, nimble rival in

“This company over time will look like an e-commerce company,” he said to analysts gathered last Thursday at Walmart’s headquarters in Bentonville, Arkansas.

One prominent Wall Street firm, Cowen & Co laid out a plan for Walmart to reach that objective. That’s all the more pressing given that Amazon’s Prime service has 49 million household members and is growing 30% a year. Still, 42% of Prime customers also shop at, meaning Walmart is still very much top of mind for Amazon’s shoppers too.



1. Continue to accelerate customer convenience: the retailer rolled out its mobile payment app this summer across its U.S. store fleet and improved its self-checkout

“The underlying principle is having ‘time’ for customers in addition to money,” Cowen analyst Oliver Chen wrote in an a research paper published Monday. He pointed to sister retailer Sam’s Club’s “Scan & Go,” an app lets members scan items they buy on their phone and checkout without dealing with a cashier as an example of what Walmart needs more of.

2. Take fuller advantage of Walmart’s “un-Amazonable” services, like its pharmacy (the 4th largest in the U.S.), health clinics, auto service, etc. that draw people into stores.

3. Use the stores. Some 90% of Americans live within a 15-minute drive of a Walmart store, giving it a network of thousands of stores at which customers can pick up online orders, or which can facilitate the shipping of e-commerce orders. There are about 600 Walmart stores in 100 markets that offer curbside pickup for online orders, and that will rise to 1,000 by year-end.

[fortune-brightcove videoid=5107324106001

4. Grocery, grocery, grocery: Walmart gets about 55% of its U.S. sales from food, making it by far the largest grocer. Cowen estimates that 22% of Prime members buy food online. But Walmart can fight back aggressively, because of what Cowen calls its “excellence in food supply chain and food compliance” and its well established position in grocery.

5. Integrate The online retailer and its specialized technology will allow Walmart to reach younger, urban and more affluent customers. That and the other items above will allow Walmart to speed up its online pricing improvements, expand its assortment and improve the customer convenience.

“Otherwise, we believe the company (Walmart) will continue to lose market share to Amazon,” Chen wrote.