McDonald’s Corp. will begin offering quarter-pound burgers with fresh beef at the majority of its restaurants next year, breaking with decades of frozen-patty tradition in a bid to improve food quality.

The move follows a test in 325 locations in Texas and Oklahoma, where the feedback was “overwhelmingly positive,” the company said on Thursday. When the nationwide plan is rolled out by mid-2018, the fresh-beef burgers will be cooked when they’re ordered, McDonald’s said.

The world’s largest restaurant chain has embarked on several initiatives aimed at improving its culinary reputation. The company removed artificial preservatives from Chicken McNuggets last year and stopped using high-fructose corn syrup in its sandwich buns. It also plans to switch to cage-free eggs by 2025.

The quarter-pounder change won’t affect other burgers, such as the Big Mac. But it represents a “watershed moment for McDonald’s,” said Joe Jasper, a franchisee who worked on the test in the Dallas area.

It also steps up competition with Wendy’s Co., which has built its reputation on offering fresh beef. But the shift may not be easy for McDonald’s 14,000 U.S. locations. Chief Executive Officer Steve Easterbrook warned last year that contamination was a potential risk.

“If you bring in fresh beef, you’ve got to be careful on the storage and the kitchen equipment, so you can’t have cross contamination,” he said at the time. “We’ve got to work out whether we have the chillers or refrigerators with the necessary capacity.”