CHAPEL HILL, N.C. (WNCN) – Scientists said street drugs are becoming more dangerous, but a University of North Carolina at Chapel Hill program is working to prevent drug-related overdoses and deaths — and it’s getting money from the opioid settlement to do that.

Almost every day, the Drug Checking Lab at UNC Chapel Hill receives samples of street drugs.

The users who provide the samples are anonymous, as they come through community health organizations.

Dr. Nabarun Dasgupta leads the drug-checking program at UNC.

“As we saw overdoses increasing in our state, we felt like we needed to learn more about what was actually killing people,” he said.

He and research chemist Erin Tracy analyze the drug samples using a machine called a mass spectrometer.

“The machine is able to separate each of the molecules and each of the components of the drugs and tell us exactly what’s in it,” Dasgupta said.

They both also told CBS 17 that different points on graphs can be key indicators for drugs.

“We know the fentanyl peak comes out around 10.28 minutes,” Tracy said, pointing to a graph on a computer screen next to the machine.

The lab has found all kinds of substances.

“We see novel kinds of opioids that are cousins of fentanyl,” Dasgupta said. “We also see certain types of contaminants from our veterinary supply chain.”

Among those is a compound called xylazine, that is commonly used as an animal tranquilizer.

“It’s causing people to lose limbs, and it’s the kind of thing we can detect with this technology very easily and help people avoid going and losing a limb,” Dasgupta said.

The contents of the drug samples are posted online here. People can also look them up using a QR code. This allows community organizations to put out warnings.

“We’ve heard stories of people throwing away drugs they found contaminated with things that are very, very dangerous,” Dasgupta said.

It also gives health care workers valuable information.

“One of the things we hear from the physicians that we work with is that it’s very hard sometimes for people to get started on the medications that help with addiction, and part of the reason why we think that is because the street supplies so variable,” Dasgupta said.

He continued, “Those medical protocols need to be tailored, based on peoples’ drug supply. Part of understanding what’s in the drug supply allows medical professionals to help people get treatment better and quicker and also for emergency departments and EMS for them to be able to know what they’re treating.”

Money from the opioid settlement will not only go to his program but to help organizations across the state with smaller portable drug testing machines. Together, Dasgupta hopes their efforts will prevent drug-related overdoses, injuries and deaths.

“I do believe this is a service – not just what we’re doing, but that can be done on a smaller scale in the community that will save lives,” he said.