(Reuters) - Coca-Cola Co KO.N reported better-than-expected quarterly profit and sales on Friday as it sold more teas, coffees and vitamin water, offsetting sluggish sales of fizzy drinks, sending its shares up as much as 2 percent.

Coke also said it planned to use cash it held overseas and savings generated from the U.S. corporate tax rate changes to reduce its debt by $7 billion, making it the latest company to take advantage of the new tax law to bolster its balance sheet.

For the fourth quarter, however, the company took a $3.6 billion charge related to the tax law, resulting in a net loss compared with a profit a year earlier.

Coke and rival PepsiCo PEP.O have been struggling with lower sales of their sugary sodas as consumers shift to healthier drinks. Earlier this week, Pepsi also reported weak quarterly sales of sodas and sugary drinks.

To stem the decline, Coke relaunched its iconic low-calorie Diet Coke in four new flavors - ginger-lime, feisty cherry, blood orange and twisted mango - earlier this year, and has focused on its non-fizzy beverages such as Georgia coffee and Glaceau vitamin water.

Coca-Cola CEO James Quincey said the new flavors and packaging were a step in the right direction and that sales of Coke Zero Sugar were picking up following a relaunch.

Net operating revenue fell to $7.51 billion from $9.41 billion a year earlier due to ongoing efforts to refranchise its bottling operations, but beat the average analyst estimate of $7.36 billion, according to Thomson Reuters I/B/E/S.

Global volume growth remained unchanged even as North America volumes increased 1 percent.

Wells Fargo analyst Bonnnie Herzog said flat unit case volume growth was a concern but positive momentum in many international markets was encouraging.

The Fanta and Diet Coke maker reported a net loss of $2.75 billion, or 65 cents per share, in the fourth quarter ended Dec. 31, mainly due to a $3.6 billion charge related to the new tax law. A year earlier the company had posted a profit of $550 million, or 13 cents per share.

On an adjusted basis, the company reported earnings per share of 39 cents, beating analysts’ average estimate of 38 cents.

For 2018, the Coke said it expects organic revenue to grow 4 percent and adjusted earnings per share to grow between 8 and 10 percent.