The U.S. House of Representatives has approved a bill to avoid a government shutdown, and extend federal protections for state medical marijuana and hemp programs.

The measure was approved by a vote of 230 to 197, which extends government funding through February 16. The approved legislation extends the Rohrabacher-Farr Amendment , was was initially passed in 2014. The amendment prohibits the Department of Justice – which includes the Drug Enforcement Administration (DEA) – from using funds to enforce federal cannabis laws in states that have legalized the plant for medical use.

The legislation also extends an amendment that gives federal protection to state laws that allow for the cultivation of hemp for research purposes.

The measure must now be approved by the Senate before it can be sent to President Trump for final consideration.