California Governor Jerry Brown signed the state’s 2018 budget into law this week, and in addition to spending almost $75 billion on education and $50 million on women’s health programs, Brown’s signature also created a new set of regulations for drivers carrying cannabis and new protocol for law enforcement officers tasked with detecting stoned drivers.

According to Courthouse News, California drivers will now be required to follow a marijuana open container law, requiring legal weed to be in sealed in an unopened container or if opened, be stored in the trunk. If cops find a rolled joint in the glove box or a ziploc baggie in the center console, drivers could be subject to a fine and confiscation.

If the cops do find a roach in your car’s cup holder though, law enforcement officers in the Golden State will now have a new tool to help them determine whether or not you are driving while impaired or not. To get to the bottom of the DUI issues that states like Colorado and Oregon have been grappling with since the early days of legalization, California cops will now be able to use a mouth swabbing device to detect THC levels in suspected impaired drivers.

“Governor Brown took a critical step today to help ensure California’s roadways are safe,” Republican Assemblyman Bob Lackey, who authored the package of cannabis driving laws, said.

The THC testing swabs are one of a few new technologies aimed at helping legal weed municipalities detect stoned drivers, with tech companies also nearing the reality of a cannabis-specific breathalyzer to detect recent use. The California-approved swab is able to detect intoxication by isolating a specific cannabis compound that breaks down hours after use, instead of months.

Another specific bill that would have established legal limits for THC in drivers was tabled in the state’s Senate Appropriations Committee. Because THC stays in the body for an extended period of time, law enforcement officers in other legal weed states have come under fire and had cases dismissed due to inaccuracies in blood and urine tests.

Several California counties participated in early testing of the drug testing swabs, and in Kern County, a positive test from the new device has been admitted as evidence against a driver who was eventually convicted for driving under the influence of marijuana and methamphetamines.

In addition to the testing swabs, the budget passage also sets aside funds to give drug-specific training to every single California highway patrol officer by January 1, 2018, and $3 million for the department to train “drug recognition experts.”

“We need to be prepared for next year when recreational cannabis sales begin, and this will allow [the California Highway Patrol] to get started on its work now.” Lackey said.