Illinois and New York passed new marijuana legislation that will result in more than 1 million minor cannabis-related cases being expunged. Illinois became the 11th state to legalize recreational marijuana on Tuesday (June 25), while New York passed a bill decriminalizing small amounts of the substance on last Thursday (June 20).

The new Illinois law will allow resident adults to buy and possess up to 30 grams of cannabis as well as purchase marijuana edibles. Money raised from marijuana sales taxes, which will depend on the potency, will first go toward expunging roughly 770,000 criminal cases, according to USA Today. Leftover funds will be diverted to drug treatment and enforcement programs, mental health services and the state’s general fund.

Illinois Governor J.B. Pritzker hopes expungement and legalization will continue to reform a system that disproportionately targets minorities. State regulators will also give priority to minority individuals seeking business licenses for growing marijuana.

While still not recreationally legal, the decriminalization of marijuana in New York will allow about 900,000 low-level marijuana arrests over the past 20 years to be expunged. The new law will enable individuals to avoid criminal penalties for holding less than two ounces of weed.

Illinois marijuana sales will begin January 1, 2020.