Obese people who participate in pounds-off programs based on diet and exercise are less likely to show symptoms of depression—regardless of whether they lost weight, according to a study in the International Journal of Obesity and reported by Reuters Health.

For the study, researchers reviewed 31 studies exploring the ties between weight loss and depression. Patients in each of these studies participated in different weight-loss programs (including medication-only regimens) that scientists randomly assigned to them. (A total of 8,000 people took part in the study.)

Researchers determined that people in almost every kind of weight-loss program not based on medication saw mood improvements. What’s more, how much weight individuals lost or didn’t lose did not affect their mood changes.

Specifically, researchers found that weight-loss programs centered on diet and counseling had the most positive effect. In addition, regimens that included regular exercise alleviated symptoms of depression. On the other hand, programs with weight-loss medication had no impact on patients’ moods.

Obesity is a well-documented risk factor for many health conditions, including depression. In addition, previous research has linked losing even a small percentage of body weight to gaining improvements in physical and mental health.

But while shedding pounds may significantly lift people’s moods, some doctors said other reasons may lie behind the mental health boost.

One reason may be that weight-loss programs improve people’s body image, said Patrick J. Smith, MD, a researcher at Duke University Medical Center in North Carolina whose study was included in the review. In addition, Smith explained, the mood changes could result from people being in a supportive group setting.

But study authors also stressed that the findings may not apply to people diagnosed with clinical depression.

Click here for a simple, easy and cheap way to kick-start your weight-loss program.