RALEIGH, N.C. (WNCN)–Four Raleigh teens from Carnage Middle School say they wanted to help fix a problem that they’ve seen too often in the news.

Naren Pai, Sajith Gogineni, Saicharan Karthikeyan and Eoin Samuel put their minds together to create a device that they hope can prevent gun violence.

The group recently took second place after creating a STEM project at a state level science fair called eCYBERMISSION.

The students said the goal of the project was to focus on making an impact in their community. The four teens said they thought of several ideas but decided they wanted to ultimately do something to prevent mass shootings, especially in schools.

Thirteen-year-old Sajith Gogineni said, “We saw almost every week there is a new shooting or something you hear in the news, so we tried to find a solution to gun violence.”

Gogineni’s teammate, 13-year-old Saicharan Karthikeyan added, “It’s not just adults, it’s happening in schools when everyone’s learning. It’s sad it’s happening because it’s not suppose to.”

The local teens spent the past year working on their project while doing tests and research. During an interview with CBS17 News, they picked up and demonstrated their device that they had created.

Naren Pai, who is also a student on the team, pointed to a BB gun and said, “we thought of two access points and that was the trigger and the safety mechanism.”

The students said they decided to create their device by using BB gun that has similar parts like a normal gun. Because all guns are required to have a safety lock, the teens focused their attention on the piece in order to figure out how to prevent it from shooting.

The team said they were able to figure out how to automatically lock the gun when entering a specific area by using a signal. They demonstrated the technology by turning on a hot spot from their phone. Once the gun came into range, the gun’s safety would automatically lock. Basically, they said the gun can’t be used when in certain places.

Team advisors Thenmozhi Karthikeyan and Umesh Pai said it’s a tough reality to see middle school students think of these issues, but they also said the kids were excited to create something that could potentially save lives.

Pai said, “Preventing the shootings in the areas we don’t want someone to come in and shoot… that idea has not been explored much.” He said the idea is a preventive measure- not a reactive one.

The students said they hope to continue to talk with local schools and gun manufacturers and demonstrate their prototype to help spread awareness.

The teens said instead of focusing on changing gun laws, they believe technology might be the answer to saving lives.