BOSTON (AP) _ A ban on sugary sodas, potato chips and other standard vending machine fare from Massachusetts schools appears to be working.

That’s according to a study that looked at 74 middle schools and high schools in more than three dozen school districts over an 18-month period.

Before the new rules, just 13 percent of competitive foods would have met the standards at the middle school level. One year after the rule, that number rose to 69 percent.

At the high school level, just 28 percent of competitive beverages met the standards before the rules. Compliance jumped to 80 percent one year after the rules.

Northeastern associate professor Jessica Hoffman, the study’s lead author, said the findings are encouraging because Massachusetts’ standards were some of strictest in the country at the time.