Starbucks just had one of its worst days on Wall Street in the past several years, as shares dipped nearly 10 percent Wednesday after the coffee giant said it would close 150 stores and lowered sales guidance.

The Street’s Brian Sozzi said it “might be the most horrifying results in the company’s history.” Jim Cramer, host of CNBC’s Mad Money, said “there’s a lot not to like.”

“While certain demand headwinds are transitory, and some of our cost increases are appropriate investments for the future, our recent performance does not reflect the potential of our exceptional brand and is not acceptable,” Starbucks CEO Kevin Johnson said in a statement.

Some analysts say Starbucks needs to offer lower-priced coffee to compete with the likes of McDonald’s, Dunkin Donuts, and smaller shops. Other think the company can be more efficient with its brick-and-mortar footprint.

Investing more heavily in technology will also be important for a Starbucks rebound.

“These issues only make it more critical for Starbucks to use its digital offerings — mobile ordering, mobile payments, and its rewards program — to turn up the heat,” wrote Bloomberg’s Sarah Halzack.

Speaking Wednesday at the Oppenheimer Consumer Conference, Johnson said “the number one thing to unlock [same-store sales] growth in the U.S. is expanding the number of digital relationships we have.”

The company says 75 million customers visit its U.S. stores every month. About 15 million of those are members of the Starbucks Rewards program — up from 13 million last year — and Starbucks has aggressively rolled out new ways to engage with the 60 million customers who aren’t rewards members.

Earlier this year the company began asking customers to provide their email address before connecting to in-store WiFi. It also recently opened up its mobile order-ahead app feature to anyone this year. The technology, previously only available to rewards members, lets customers order with their smartphone via Starbucks’ app and skip the line.

The mobile order-ahead feature accounted for 12 percent of transactions in the U.S. last quarter. Starbucks has tweaked the mobile order-ahead process since it launched in 2015, adding dedicated pickup zones to address increased in-store congestion traffic. The company is also testing a new store format at the Empire State Building in New York City that is a dedicated mobile order pickup store.

Expanding the mobile order-ahead feature and requiring sign-ups for WiFi and Happy Hour deals helped Starbucks add five million new “digital customers” in the past three months, Johnson said.

Johnson, a long-time tech executive who became CEO last year, also on Wednesday announced tweaks to the rewards program. A new initiative called “Stars for Everyone,” will let people earn rewards points with their credit or debit card, versus the Starbucks mobile app, when buying items.

“They’ll earn stars at a lower rate than Rewards customers, but they will earn stars,” he said. “It’s a way to now attract customers who want to benefit from the Rewards program simply by using their credit card and debit card.”

Building more “digital relationships” will help Starbucks personalize its customer interactions online with contextually and situationally-relevant offers.

“Perhaps one of the most important things we’re doing is we are applying our personalization engine to these new digitally registered customers,” Johnson said. “And you think about this, our ability from a technology standpoint to look at tokenized credit card transactions map up to a digitally registered customer allows us to point this personalization engine that has driven significant comp growth with our active Rewards members and start to focus it on these digital registered customers.”

Starbucks will also move to a “multi-tier redemption” process for customers who use rewards points to buy products — items will require varying amounts of points based on the retail price, Johnson said.

Starbucks is betting that more personalized deals and engagement with customers will help increase revenue.

“If we can get those customers into that personalization engine, we will drive comps,” Starbucks CFO Scott Maw said at the recent UBS Global Consumer and Retail Conference. “It’s just a matter of getting the information and then tracking and building the capability to market to them.”

Starbucks actually has the most popular mobile payments platform, according to data from eMarketer. More than 30 percent of all U.S. transactions are paid for with the mobile app.

“The Starbucks app is one of the bigger success stories in mobile proximity payments,” eMarketer Forecasting Analyst Cindy Liu said in a statement last month. “It has gained traction thanks to its ability to tie payments to its loyalty rewards program. For users of the app, the value of paying with their smartphone is clear and simple — you can save time and money at the register, all while racking up rewards and special offers.”

Speaking at the company’s shareholders meeting earlier this year, Roz Brewer, Starbucks chief operating officer and group president, said that mobile payments within the fast food industry jumped 75 percent between 2016 and 2017. Companies like McDonald’s, Domino’s, Panera, and others are also investing heavily in mobile technology.

“We have plenty of opportunity to form active relationships with millions of more customers,” Brewer said, adding that “we know how powerful digital engagement is as a driver of customer satisfaction and increased spend with Starbucks.”