An Oregon teenager’s innovation could change the way doctors treat pancreatic cancer, a deadly form of the disease that has just a 7% five-year survival rate.

Rishab Jain, a 13-year-old from Stoller Middle School in Portland, on Tuesday won the Discovery Education 3M Young Scientist Challenge with an algorithm that uses machine learning to help doctors zero in on the pancreas during cancer treatment. Doing so can be difficult, since the pancreas is often obscured by other organs, and since breathing and other bodily processes can cause it to move around the abdominal area. As a result, doctors sometimes need to deploy radiation treatment with an “error circle” that ensures they’ll hit the pancreas, but that may kill some healthy cells as collateral damage.

Jain’s algorithm could relieve some of those problems by helping doctors locate the pancreas with precision.

“In the radiotherapy treatment where radiation is applied to kill tumor cells, my tool tracks the pancreas in the scan itself,” Jain explains. “When the radiation hits, it hits the pancreas accurately and efficiently so it can help treat the tumor much more effectively.”

Jain, who took home the Young Scientist Challenge’s $25,000 prize for his idea, says he first became interested in pancreatic cancer last year during a trip to Boston, and became even more passionate when a family friend died of cancer. “[In Boston] I learned about the low survival rate and how deadly the disease was,” Jain says. “I’m also into programming, so I was learning about artificial intelligence. I decided to combine the two areas into trying to solve a real-world problem using artificial intelligence.”

With help from 3M mentor scientist Dr. Döne Demirgöz, Jain’s work paid off this week at the competition in Minnesota. He says his software could work with hospitals’ existing radiotherapy equipment, or be incorporated directly into new machines. He’s currently in touch with doctors at both local Oregon and big-name national hospitals — including Johns Hopkins Hospital and Memorial Sloan Kettering Cancer Center — in hopes of fine-tuning and eventually implementing his idea.

For now, he says he’ll use his winnings to advance his machine learning project and fund the nonprofit he created, Samyak Science Society, which is meant to promote STEM learning for “other children who might not have that opportunity like I did,” and raise pancreatic cancer awareness. He says he’ll also put some of the money toward a college fund, so he can study to become either a biomedical engineer or a doctor.

“For undergraduate, I’m not entirely sure yet,” Jain says. “But I’m thinking of maybe biomedical engineering, because it has both fields in it. Biomedical engineering and then probably medical school for becoming a doctor.”

Of course, the middle schooler has some time to figure it out — and in the meantime, he’s got plenty of ways to fill his time.

“I flew back to Portland [after I won], so I went to my school to visit my teachers and tell them about the news,” Jain says. “And also catch up on homework.”

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Jamie Ducharme at jamie.ducharme@time.com.