Coca-Cola Co’s quarterly revenue and profit beat analysts’ estimates on Tuesday, as investments to cater to changing consumer tastes paid off with higher sales of its sugar-free sodas and premium waters.

The world’s biggest beverage maker, like rival PepsiCo Inc, has been building up a portfolio of non-carbonated drinks and also doubling down on its investments in enhanced waters such as Topo Chico and electrolyte-filled smartwater.

Coca-Cola paid $5.1 billion for the world’s second-largest coffee chain Costa earlier this year and took a stake in Kobe Bryant-backed sports drink BodyArmor in a bid to court a younger demographic that prefers sipping lattes over gulping big sodas.

Chief Executive Officer James Quincey said this year’s results highlight Coca-Cola’s “evolution as an even more consumer-centric, total beverage company”.

Organic revenue, or sales from its core beverage business, rose 6 percent in the third quarter, with double-digit volume growth for Diet Coke and Coca-Cola Zero Sugar.

Volumes, a key indicator of demand, grew 2 percent in the quarter on strong performance of its sodas across categories, along with premium waters.

The company earlier this year launched new flavors of Diet Coke such as ginger lime, feisty cherry with slimmer packaging, and said it will introduce two variants of its smartwater brand in its flagship U.S. market.

“We are impressed with Coca-Cola’s ability to deliver a strong and balanced topline, suggesting that its refranchising and portfolio transformation are paying off,” Wells Fargo analyst Bonnie Herzog said.

Net income attributable to the company’s shareholders rose to 30 percent in the three months ended Sept. 28.

Excluding one-time items, Coca-Cola said it earned 58 cents per share, beating analysts’ average estimate by 3 cents, according to Refinitiv data.

Revenue fell 9 percent to $8.25 billion, due to the disposal of its low-margin bottling operations, but beat expectation of $8.17 billion.

The company’s shares were largely unchanged in premarket trading. This year, the shares have gained 1.2 percent, compared with a near 6 percent drop for PepsiCo. The broader S&P 500 Consumer Staples index is down 4.5 percent for the period.

Reuters (Reporting by Aishwarya Venugopal in Bengaluru; Editing by Sriraj Kalluvila)