Prime Minister Justin Trudeau made good on a major campaign promise Thursday, introducing a bill to legalize recreational marijuana in Canada.

Here’s everything you need to know about the historic bill:

Nearly unprecedented: Completely legalizing marijuana as a consumer product, as Trudeau’s bill aims to do, has been achieved by only one other country: Uruguay.

Guaranteed to pass: The bill will be reviewed in Parliamentary committees, where alterations could be made. The bill is all but guaranteed to pass, as Trudeau’s Liberals have a majority in the House of Commons.

Timeline: The plan is to have the system in place by the end of June 2018. Says Liberal MP Bill Blair, the government’s point man on legalization: “We have a responsibility to act as expeditiously as we can … we can’t drag our feet; we aspire to get this done as quickly as possible.”

Power to the provinces: Each province will decide exactly how the drug will be distributed and sold within its boundaries. That includes setting their own licensing, distribution, and retail sales rules, establishing zoning rules for cannabis businesses and changing traffic safety laws as they deem necessary.

Lessons from tobacco: Tobacco is highly regulated in Canada, but the country ran into problems when it tried to discourage smoking with enormous cigarette taxes. After inspiring a black market for cigarettes smuggled across its borders, Canada slashed the rate in the ’90s. Many expect the country to avoid a similar situation with cannabis taxes.

Alcohol template: Where will consumers purchase cannabis? Many expect provinces to restrict sales to government-run shops, as several already do with alcohol.

Don’t expect one-stop sinning: A federal task force last year recommended marijuana not be offered in shops that also sell alcohol.

Age matters: Purchasers will need to be at least 18 years of age (provinces can set a higher minimum). Many doctors and police officials are pushing for a higher minimum age for high-potency products. The bill also includes stiff new criminal penalties for providing marijuana to minors — or even creating cannabis products that appeal to the underage.

Carry limits: Individuals can carry a maximum of 30 grams (about an ounce).

Grow limits: Households will be allowed to grow up to four cannabis plants. Commercial growers will require licenses and be under heavy regulatory scrutiny.

Impairment remains a massive variable: Don’t expect the legal market to expand until the government develops marijuana equivalents for breathalyzers and blood alcohol content. Police forces are testing screening devices that can detect THC in saliva.

United Nations hurdles: The bill could put Canada in violation of three drug-related UN treaties, though some expect the country to exploit “scientific purposes” exemptions.

Brands will struggle to stand out. The government is considering regulations that would allow only plain packaging, limited to providing factual information about the product, like its name, its ingredients and the strain of marijuana used.

Edibles are coming. The government says it intends to bring other products, including pot-infused beverages and edibles, into the legalized arena once regulations for production and sale are developed.