CHARLESTON, W.Va. (AP) — A legislative analyst for the Marijuana Policy Project told state lawmakers on Wednesday that permitting the use of marijuana for medical purposes can generate revenue for the state, although he says helping patients who need it is more important.

Matt Simon made the comments to an interim legislative committee studying the use of marijuana for medical issues, which is currently not allowed in the state.

The National Conference of State Legislatures says 20 states and the District of Columbia permit the use of marijuana for medical purposes. Marijuana is still outlawed under federal law, however.

Simon said some states that allow marijuana for medical use receive significant revenues, while others wrote their laws to be revenue-neutral and a few operate at a loss. But more importantly, Simon said marijuana needs to get into the hands of patients that need it to alleviate certain medical conditions. The resolution authorizing the study of medical marijuana by the legislature cited a host of illnesses that marijuana can be used to treat, including cancer, glaucoma and epilepsy.

“The Legislature is committed to evaluating the use of appropriate pain therapy techniques as those develop within various regulated clinical environments and applying those methodologies in this state to provide appropriate and cost-effective pain therapy for the citizens of this state thus reducing the likelihood of addition and abuse,” the resolution says.

Simon also told lawmakers that public opinion on legalizing marijuana is shifting toward allowing it, citing a recent survey by the Pew Research Center.

That national survey conducted in March found that 52 percent of respondents said the use of marijuana should be made legal while 45 percent said it should not.

No specific legislation that would allow the use of medical marijuana in West Virginia was discussed during the hearing. The next legislative session doesn’t begin until 2014.