Medical marijuana use in Canada was effectively redefined Thursday by the country’s highest court to include a wider scope of applications for the natural medication. Those who are legally permitted to use marijuana for medicinal purposes are now allowed to bake the plant into food, otherwise known as edibles, as well as other forms of ingesting, the Globe and Mail reported.

The Supreme Court of Canada ruling, which was unanimous, widened the scope of medical marijuana use because of health concerns over smoking, which had previously been the only way patients were legally permitted to consume pot. “The evidence amply supports the trial judge’s conclusions that inhaling marijuana can present health risks and that it is less effective for some conditions than administration of cannabis derivatives,” the court ruled, according to the Globe and Mail. In addition to edibles, such as cookies and brownies, and smoking, patients will now be allowed to explore other applications, such as lozenges and marijuana-infused oils.

One local marijuana advocate expressed his happiness over Thursday’s ruling, which expanded considerably the legal parameters for medical marijuana beyond using the plant only in its dried form. “Patients are now out of this legal limbo that they were floating in, possibly being arrested just for baking with their own medicine,” Steven Stairs told Canadian news outlet CJOB. “We will now be free from this criminalization and be able to use our medicine the way we need and the best way for our body and our treatment.”

Thursday’s ruling was the conclusion of a lengthy court battle that began in 2009 after Owen Smith of Victoria, British Columbia, was arrested for selling edibles for medicinal purposes out of an unsanctioned medical marijuana club, the Globe and Mail reported. After judges ruled that limiting patients’ marijuana use to smoking violated their rights and an appeals court agreed, the Canadian federal government consequently appealed, arguing that it was illegal “to obtain or produce drugs based on a subjective belief in their therapeutic value, irrespective of medical need or lawfully available alternative treatments.”