When we get our blood tested for cholesterol, it doesn’t take long to get the results. And if someone turns up at the hospital with what looks like a drug overdose, doctors can perform a quick test to verify their suspicions before treatment.

But unlike popular crime series like CSI, in which investigators whip up test results in the span of a quick montage, most forensic toxicology reports take anywhere from a few weeks to a few months. This can be an excruciating wait after mysterious deaths and unsolved crimes. Why does it take so long?

Quartz spoke with Robert Middleberg, a toxicologist from NMS Labs in Willow Grove, Pennsylvania, to find out.

Unlike other medical tests, where technicians isolate a specific compound like cholesterol, Middleberg says that you don’t always know what you’re looking for with forensic toxicology. “If you have a young person who is found dead in bed and there’s no history of drug abuse, you’re looking for the proverbial needle in a haystack,” he tells Quartz.

Testing times

After a body is found and an autopsy is performed by a pathologist, a separate lab will look for any environmental or pharmaceutical toxins that could be the killers. Without any clear clues, Middleberg says they will start testing for about 400 different substances. “We never know what we’re going to get,” he notes. It takes creative intuition to guide a cycle of testing and interpreting the results of tests to inform further testing.

Once an initial analysis returns a match for a particular substance, toxicologists must gather more specifics for the official report. Bodies that have already started decaying produce some toxins naturally, like ethanol (another name for the alcohol we drink) and cyanide, so toxicologists may have to perform additional tests to determine whether these played an active role in the cause of death.

All of this is further complicated by the fact that samples often arrive in less than ideal conditions. ”If somebody is pulled out of the water after being missing for two or three weeks, these samples are very, very bad,” Middleberg says.

Unlike testing in an emergency room to confirm an overdose, pathology focuses on specifics. “For [medical toxicologists], sometimes it doesn’t really matter exactly what’s there,” Middleberg says. “In our world, the pathologists want to know exactly what it is and how much.”

Not every test is a complicated affair—despite all of the unknowns, Middleberg says that most labs try to have a turnaround time of 3-5 days for ruling things out and 7-10 days for identifying the specific factors leading to death.

Looking for clues

Like detectives, toxicologists look for clues to narrow down which tests are necessary. Knowing a subject’s history with drug or alcohol use obviously helps. There are also several somewhat macabre rules of thumb that tip toxicologists off to seek substances they wouldn’t normally test for: