It turns out that seeing the glass half full might actually protect your brain health. What’s more, a recent study suggests that even being married to a “glass half full” kind of person can reduce your risk for cognitive decline.

In this study, older people who were married to optimists scored better on tests used to measure dementia risk and predict the onset of Alzheimer’s disease.

What’s the connection? Researchers think there might be a few reasons why an optimistic spouse can reduce their partner’s dementia risk.

Optimistic people tend to have healthier behaviors like exercising regularly and eating fruits and vegetables. These behaviors are associated with better cognitive function (and reduced risk for cardiovascular disease). When one partner incorporates healthy lifestyle habits into their day, the other partner is likely to follow suit.

The active lifestyle often led by optimistic people also helps their spouses create memories of happy shared experiences which are associated with less stress and better mood, two protective factors for cognitive decline.

If your partner isn’t exactly what you’d call optimistic, don’t fret. Surrounding yourself with optimistic friends, family, and coworkers can offer some of the same benefits.