Researchers have tested a stun gun — sorry, a “conducted electrical weapon” — that monitors its target’s heart rate and rhythm so it can avoid killing them.

The researchers at Wake Forest Baptist Medical Center in Winston-Salem, North Carolina announced their findings on August 9. Right now, the team’s prototype is merely a proof of concept stun gun manufacturers will have to build upon in the future.

That prototype is an otherwise typical stun gun used by law enforcement officers that was modified to transmit electrocardiogram (EKG) signals in addition to delivering enough voltage to incapacitate the officer’s targets. It was tested on human volunteers, and the researchers found that the “prototype device successfully produced both incapacitating charges and interpretable EKG signals.” In other words, it could both knock you down and make sure your heart was doing okay at the same time.

“The basic components of a CEW – probes that penetrate the skin while attached to insulated wires connected to an electronic device – are functionally similar to what is used to obtain an electrocardiogram,” Wake Forest assistant professor Jason Stopyra said in a news release. “We set out to see if we could combine a heart monitoring device with an existing CEW to detect and store cardiac rhythms without impeding the function of the weapon, and we succeeded.”

Information collected from stun guns modified this way could help prevent accidental deaths from the weapons. Stun guns are intended as a “less-lethal” method of stopping a suspect — they’re deliberately designed not to kill anyone. While they often perform as designed, the massive amount of volts they can deliver can easily prove fatal to some suspects.

In fact, a Georgia man named Chase Sherman was killed earlier this year when police fired a Taser at him 15 times. Here’s a (graphic) video of the incident from Al Jazeera Plus:

Sherman isn’t the only one. The Guardian reported in November 2015 that dozens of people have been killed by police using stun guns. The Guardian’s report showed that many police departments ignore national standards on their stun guns that were modified in 2011 to reduce deaths.

That’s where the Wake Forest prototype could be useful. It would give police a better idea of when someone is at risk of dying if they are shot with a stun gun, while maintaining law enforcement’s ability to stop aggressive targets. This is assuming, of course, that a stun gun manufacturer decides to put the institution’s research into practice. It would also depend on the police being trained to use the new devices and monitor their suspects’ vitals while using them.

Wake Forest’s research is a rare example of technological advancements benefitting ordinary people just as much as law enforcement. Many tools go in the other direction — they give police the means to surveil people, to break into someone’s phone, to use body-cams as instant replay machines, and even to kill suspects from afar with repurposed military robots.

This prototype, on the other hand, is all about saving lives from police violence. Considering that people already believe that’s what stun guns are for anyway, the prototype is a clear win for society at large.

Photos via Getty Images / Christopher Furlong