When I first learned that investigators can look at tiny marks on shell casings from bullets to get leads on gun crimes that plague neighborhoods across the country, I had to see for myself.

As part of a reporting trip for my feature on Contra Costa County’s no-excuses crime lab in Northern California, I observed technicians using the National Integrated Ballistic Information Network, or NIBIN, a database maintained by the Bureau of Alcohol, Tobacco, Firearms and Explosives.

Here’s what I learned about how NIBIN works: Police collect crime guns and spent shell casings from crime scenes. The evidence is sent to a forensic lab, where technicians test fire the guns and collect those casings, too. Next, the techs enter the test-fired casings alongside the crime-scene casings into the NIBIN database. The database then matches shell casings that are likely to have been shot from the same firearm, information that can help investigators connect the dots on gun crimes that might otherwise go cold.

Many see NIBIN as law enforcement’s best hope for getting shooters off the street before they commit more crimes. It helped to do just that in at least one case in Contra Costa: In the summer of 2016, NIBIN helped investigators put a stop to a crime spree that terrorized the county for weeks, and left three people dead.

It’s wonky stuff, I know, which is why I took footage of it all. If you’re curious about potential solutions for the nation’s gun violence crisis, watch NIBIN in action in the video above.