Virginia Gov. Ralph Northam (D) on April 21 signed into law a bill that legalizes adult possession of small amounts of recreational marijuana starting July 1. The massive piece of legislation — more than 280 pages — is complicated and will take several years to be fully enacted.

The General Assembly passed the measure on Feb. 27 during its 2021 session, though several details were left unfinished. Northam recommended amendments that addressed some of the loose ends, and the legislature approved those changes during a reconvened session on April 7.

Virginia becomes one of 16 states, plus the District of Columbia, to legalize weed. Some parts of the law concerning criminal penalties and a commercial marketplace will have to be reenacted during next year’s legislative session, beginning in January. Here’s an overview of where things stand: