Eighteen shampoos in the Herbal Essences line made by Procter & Gamble will be reformulated to reduce levels of a cancer-causing chemical called 1,4-dioxane, according to the Campaign for Safe Cosmetics.

Procter & Gamble agreed to overhaul the products as part of an agreement with David Steinman, founder of the Green Patriot Working Group (GPWG), which tested the product and found levels of the chemical that violate California’s Proposition 65, the toxic enforcement act.

Since 2007, GPWG has worked with third-party laboratory Exova to test dioxane levels in more than 150 products. 1,4-dioxane is a known animal carcinogen and is considered a probable human carcinogen by the U.S. Environmental Protection Agency. Because it’s a contaminant produced during the manufacturing process and not an ingredient, it does not have to be listed on product labels.

Procter & Gamble has been working on sustainability in recent years, more than doubling its stakes in green products and packaging, and the company releases a full sustainability report annually. Procter & Gamble also no longer tests its beauty and grooming products or individual ingredients on animals.

But the company acknowledges that it has a lot of work to do, and many of its products — including Herbal Essences shampoos like Hello Hydration — contain other ingredients that are considered potentially harmful.

“We’re glad Procter & Gamble is reducing the levels of carcinogenic contaminants in Herbal Essences,” said Lisa Archer, national coordinator of the Campaign for Safe Cosmetics. “It’s a good step, but even more is needed to assure customers that P&G products are free of toxic chemicals.”

Read more about Procter & Gamble: Procter & Gamble and the environment