You’ve probably heard that being in a good mood can improve your health. Now, researchers say a positive attitude may also boost the effectiveness of your flu shot.

Researchers examined data from 138 people between the ages of 65 and 85. They all got a dose of the 2014-2015 influenza vaccine.

Scientists took note of several health indicators, like mood, stress levels, negative thoughts, sleep patterns, and diet. They also looked at antibody responses at four and sixteen weeks after they got the shot.

They found that participants who reported a more positive mood also had higher levels of antibodies in their blood.

One of the study’s authors said there are a variety of factors that can affect how well a vaccine works, but believes the study suggests that mood is one of those factors.