On Jan. 1, 2018 California will be the latest state to have legalized recreational marijuana, but one problem facing regulators is how to test drivers for being under the influence of marijuana. Several companies are racing to develop ways to test if a driver is impaired by marijuana use.

With his company Hound Labs, Mike Lynn is developing a marijuana breathalyzer that tests for THC, the active ingredient in marijuana, on people’s breaths.

“It’s a huge technological and scientific challenge that we had to overcome,” Lynn told KNTV last week. “It took us a few years to overcome but we figured it out and we can measure just a few particles of THC, so it’d be like measuring a few drops of water in a hundred swimming pools put together.”

Lynn is a trauma doctor and reserve deputy sheriff. He said that his device can detect THC on someone's breaths for a few hours after they have smoked or ingested it. Lynn said that if THC is still on someone’s breath they are more likely than not still impaired.

The Oakland-based company said that the devices will get to market sometime next year and will cost between $500 and $1,000. The company is working with the University of California Berkley and University of California San Francisco on the technology to detect THC, according to KTRK.

Lynn said that the device will be able detect alcohol consumption as well. Mixing marijuana and alcohol has a stronger effect on drivers.

Another company developing a breathalyzer for marijuana is Canadian-based company Cannabix Technologies.

“The Cannabix marijuana breathalyzer is a cutting edge, non-invasive drug impairment recognition system. It uses breath-testing technology to test individuals for recent consumption of THC,” said the company in a statement.

Currently, police officers in California have to use traditional field sobriety tests and context clues to determine if a driver is high, like the smell of marijuana or dilated pupils. Some police feel that they have gotten much better at determining if drivers are high over the years.

“We don’t need a better test,” Berkeley Police Sgt. Jennifer Tate told KALW. “If people are impaired, we can tell.”

Washington and Colorado have set THC limits for their drivers while California has decided to just ban driving under the influence of any drug at all.

Unlike alcohol, THC can stay in a person's system for weeks, making short-term determinations of impaired driving more difficult. Blood tests for THC can show positive long after a person had used marijuana.