(Reuters) - Starbucks Corp SBUX.O attracted more customers in the latest quarter on an expanded line up of beverages and food offerings in the United States and China, leading the coffee chain to raise its fiscal 2019 profit forecast.

FILE PHOTO: A Starbucks sign is show on one of the companies stores in Los Angeles, California, U.S. October 19,2018. REUTERS/Mike Blake/File Photo

Shares of the company rose nearly 6% to $96.40 after the bell and were on track to hit a record high, after the world’s largest coffee chain posted its biggest same-store sales growth in three years.

Starbucks has been trying to make its menu more appealing by adding new beverages such as the Dragon drink and Cocoa Cloud Macchiato, while also expanding the delivery side of its business with new partnerships.

The added food options and Nitro Cold brew, a rich coffee that has a foamy texture like beer, lured more customers to stores during lunch hours, which is typically the slowest time of the day, the company said.

Those efforts led to a 3% growth in traffic in the second quarter.

“(Traffic is) an area where Starbucks has struggled,” Edward Jones analyst Brian Yarbrough said. “A lot of investors were asking: ‘When are you going to see a traffic increase?’ ... This is a nice quarter on that standpoint.”

The in-store traffic trend was encouraging as Starbucks and other restaurants had been raising prices to buffer bottom lines as more customers increasingly use mobile apps to order food and beverages.

The company has also been investing heavily in China by opening new stores and expanding delivery to cater to increased demand for on-the-go coffee.

Same-store sales rose 5% in China and the Asia-Pacific region, beating analysts’ estimates of a 3.45% growth, according to IBES data from Refinitiv. In Americas, same-store sales surged 7%, above estimates of a 4.43% gain.

The company is now expecting same-store sales near the top end of its fiscal 2019 forecast of 3% to 4% growth and raised its earnings forecast to between $2.80 and $2.82 per share.

Total net revenue for the third quarter rose 8.1% to $6.82 billion. The company earned 78 cents per share.

Analysts had forecast a profit of 72 cents per share and revenue of $6.68 billion.