Sex education in California public schools must be “complete, medically accurate and free of bias” and must include more than abstinence-only lessons, according to a ruling by superior court judge Donald Black, the Guardian reports.

The ruling involved a suit against Clovis Unified School District but could set precedent and help enforce a state law barring abstinence-based teaching. The Clovis school district has some of the state’s highest rates of teen pregnancy and sexually transmitted infections.

California schools do not have to teach sex ed, but a 2003 law stipulates that if schools do teach the subject, then the lessons may not focus on abstinence only, and they must be medically accurate and include issues such as HIV/AIDS, sexual orientation, gender roles and emergency contraception.

According to the Guardian article, more than 90 percent of California schools do teach sex ed, but many do not follow the law. In fact, less than a third of the state’s schools include lessons about sexual orientation and more than a quarter fail to teach about HIV/AIDS.