Hershey is vowing to get a little healthier.
The candy maker on Friday unveiled a big commitment: by 2022, it wants to ensure that 50% of the company’s standard- and king-sized confection snacks will contain 200 calories or less. Currently, only 31% of Hershey’s hsy products in those sizes are under that threshold.
The commitment comes as Big Food maker executives admit that a consumer shift toward cleaner, healthier foods isn’t just a fad—it is a sustainable movement that shows no signs of slowing or reversing. While that trend implies that Hershey, which makes the namesake chocolate, Reese’s, and Krave snacks would be at a disadvantage competitively, the chocolate maker is actually performing well because indulgent snacks like ice cream, candy and salty stacks are actually continuing to post strong sales. In fact, Hershey has predicted sales will increase by 2% to 3% in 2017, due to the rollout of new treats like Hershey’s Cookie Layer Crunch bars. Many Big Food rivals are posting either flat or declining sales.
More from FORTUNE
But that doesn’t mean that Hershey can completely ignore the tilt toward healthier foods and drinks. Along with the commitment to cut back on calories, Hershey also vowed to add front-of-pack calories labels on the company’s confection treats by the end of the year. That will make it easier for consumers to know what’s in their snacks—a commitment Hershey says is a first for the confectionery and snacking company.
To cut back on calories, Hershey says it will aim to hit the 2022 target through a combination of reformulating existing snacks, innovating new products, and adjusting the size of certain items in the portfolio.
That strategy is straight from the playbooks of soda giants PepsiCo pep and Coca-Cola ko , which have each relied on marketing and selling smaller soda packs and de-emphasizing the traditional 2-liter bottles in favor of smaller, slimmer cans so consumers can indulge on a Pepsi or Coke but not feel too guilty about it.
PepsiCo also unveiled a slew of new sodas and other beverages that contain fewer calories so it can hit the target it vowed for 2025: at least two-thirds of that company’s global beverage portfolio will contain 100 calories or less from added sugars per 12-ounce serving. Coke has launched more than 100 new low- or no-calorie drinks since 2014. Those efforts to get healthier have helped both perform well financially in North America.