The Pennsylvania House of Representatives moved forward Wednesday with a bill that if enacted into law would allow medical doctors in the state to prescribe marijuana creams, gels, oils, ointments and pills, as well as cannabis in liquid form. The lawmakers approved the measure by a 149-43 vote.

Before medical marijuana becomes legal in Pennsylvania, the bill would have to be OK’d first by the state Senate and then by Democratic Gov. Tom Wolf, according to the Morning Call newspaper in Allentown. The Senate passed a previous version of the legislation by a 40-7 vote last May, but it has since been amended to limit the qualifying conditions for cannabis prescriptions. House Bill 193 is set to be considered in the Senate on Monday.

“Every line of this bill is not perfect, but there are no perfect bills that pass this General Assembly,” Rep. Mark Cohen of Philadelphia said during the debate over the legislation. “I think we have an excellent chance to have a genuine bipartisan achievement, and genuine bipartisan achievements are hard to come by.”

If the measure reaches the governor’s office, Wolf said he would sign it into law. Before the House voted, the governor encouraged lawmakers to approve the bill. “It is time to legalize medical marijuana because we should not deny doctor-recommended treatment that could help people suffering from seizures or cancer patients affected by chemotherapy,” he said in a video Tuesday. “I urge quick action by the Legislature to legalize medical marijuana.”

Under the legislation, medical practitioners would be able to prescribe marijuana treatments to patients suffering from conditions such as AIDS, cancer, epilepsy, glaucoma and multiple sclerosis, as well as chronic or intractable pain. The measure also would allow the state to regulate cannabis dispensaries and growing facilities.

Assuming the bill is enacted into law, Pennsylvania would become the 24th state to legalize medical marijuana. Meanwhile, four states and the District of Columbia also have gone on to legalize the recreational use of the drug.