Treating depression is not an easy matter, and prescribing medication is far from a perfect solution. And given the nature of the problem, it is also often difficult to get patients to continue with the course of treatments.

A study by researchers from the University of California, Davis, tested the idea of video games being an effective tool to treat depression by prompting the study’s participants to play the games. And they found that when reminded, the participants played the game more often and in some cases, also for longer.

Read: Video Games A Good Treatment Tool For Depression, Study Finds

The participants in the study were 160 student volunteers, average age 21, who said they had mild depression. The message prompts they were sent differed slightly, based on whether the depression was considered internal — caused by a chemical imbalance or was hereditary — or external — triggered by factors like jobs or relationships. But they all ended with the same words, advocating the benefit of the games and exhorting the participants to play them the best they could.

“Using six, three-minute games, the study found in most cases that playing the specifically designed game helped subjects feel they had some control over their depression. Each game was an adaptation of neurophysiological training tasks that have been shown to improve cognitive control among people experiencing depression,” according to a statement Monday by the university.

The study’s authors said they did not examine if playing the video games actually helped reduce the depression, and that it is something they will look at in future studies. However, they added that the efficacy of video games and carefully worded prompts to play them could make for an engaging treatment platform.

“Assigning internal causality language led to greater game usability and higher intentions of using the games. Game performance and time spent playing the games, was higher for external causality language. Overall, findings from this study demonstrate the effectiveness of specific message prompt features to promote video game experience for mental health apps,” the study concluded.

Titled “Playing to beat the blues: Linguistic agency and message causality effects on use of mental health games application,” it appears in the June 2017 edition of the journal Computers in Human Behavior. It was authored by Subuhi Khan and Jorge Pena from the department of communication at the university.

According to data from the National Institute of Mental Health for prevalence of depression, 6.7 percent of all U.S. adults suffered at least one episode of major depression (lasting two weeks or longer) during 2015, and when considering the numbers for adolescents aged 12-17 years, the number shot up to 12.5 percent of the national population in that age group.