Video games are fighting back against their brain-rotting reputation as recent studies show that they can be used to improve cognitive performance and provide insight into how we learn. A new study from the University of California Davis offers one more use: treating depression.

Read: How Gamers Get Good, According To Science

Researchers recruited 160 students for the study in which they played six, three-minute games aimed at treating depression using a health app. Participants received persuasive messages reminding them to play, which helped them play more often and for longer periods of time.

The messages and games were designed to treat internal (caused by heredity or chemicals) or external depression (caused by outside forces like job dissatisfaction). Messages varied, but were inspirational and meant to encourage subjects to play the game. According to a blog post on the UC Davis website, each message ended with,“Just like a regular workout, much of the benefit of these tasks comes from using them without taking breaks and putting in your best effort.”

The study found that the games helped most people feel like they actually had control over the depression. Previous research has shown that a sense of control can actually help lower psychological distress, depression and anxiety. The games were adapted from neurophysiological training tasks that have been shown to improve cognitive control in depressed people.

Researchers said that providing a brain training game to help with internally caused depression made participants feel like they could do something to control it, while games for externally caused depression led people to spend more time playing the game. However, researchers caution that the latter was unlikely to have long-term benefits. They also say that the games didn’t reduce depression, however that will be a target for future studies.

Read:World Happiness Day 2017: Norway Is The Happiest Country On Earth; US Falls Even Lower Than Previous Year

A video game study last month showed that by looking at how gamers get good, scientists can use the data to teach us the best ways to learn.

See Also:

Men Less Stressed Than Women By Traumatic Life Events, Including Divorce And Sickness, According To Study

Baby Blues Diet: Nutritional Supplements May Prevent Post-Partum Depression