This piece originally appeared on Money.com.
There’s good news if medical marijuana is legal in your state: Using the substance to treat conditions like depression and seizures could lower your prescription drug costs.
Medical marijuana has helped the financial bottom line of Medicare’s prescription drug benefit programs in states that have legalized it for medicinal purposes, according to research from the University of Georgia. The savings, a result of lower prescription drug use, was estimated at $165.2 million in 2013, when 17 states and the District of Columbia had medical marijuana laws. The researchers also theorize that if all states had implemented the program, Medicare would have saved $468 million in 2013.
Still, the savings are a drop in the bucket for Medicare Part D’s 2013 budget of $103 billion, representing just 0.5% of its total bill. But the researchers say that figure represents a sufficiently significant difference to note that some people are turning to the drug as an alternative to prescription medication.
For more on marijuana, watch this Fortune video:
“The results suggest people are really using marijuana as medicine and not just using it for recreational purposes,” said the study’s lead author Ashley Bradford.
The researchers came to their conclusion by looking through data on all prescriptions filled by Medicare Part D enrollees between 2010 and 2013. They then focused on those to include conditions for which marijuana might serve as an alternative treatment, including anxiety, glaucoma and sleep disorders.
They found that fewer prescriptions were written across all disease categories, dropping by 1.826 daily doses for pain diseases and 265 for depression conditions. The only disease for which prescriptions increased was glaucoma, where daily doses rose by 35. While weed decreases eye pressured caused by the disease by about 25%, its effects last just an hour, rendering medical marijuana an unrealistic treatment.
Still, getting your hands on medical marijuana remains difficult. Only half of all 50 states, plus the District of Columbia, legally allow it. Each has different guidelines for use and limitations for possession. Additionally, physicians in these states may only recommend its use; they’re not allowed to prescribe it.