We know how often you move and what you eat can certainly have an impact on how you feel. In addition to your vinyasa yoga and quinoa bowl, it turns out that your next shopping trip might also impact your health. So, can science really help you justify that pair of boots you just bought?

Shopping can restore your sense of control
According to a 2014 study in the Journal of Consumer Psychology, when you’re sad you believe that your life is not in your control. But “the choices inherent in shopping may restore personal control over one’s environment and reduce residual sadness,” according to the study’s researchers. You decide what store to go to, what you like, and whether you purchase it. This small act can make you feel that some sense of order has been restored.

Online shopping can give you a dopamine boost
Dopamine “allows certain nerve cells to communicate with one another,” including communication in our central nervous system essential to movement, motivation, and pleasure, according to The Society of Neuroscience. It’s released in our brains not when we have actually experienced pleasure, but in anticipation of pleasure. Sex and drugs are two ways scientists know we get a release of dopamine; online shopping is another. In a 2015 survey called Digital Dopamine, 76 percent of people in the US, 72 percent in the UK, 73 percent in Brazil, and 82 percent in China said they’re more excited when their online purchases arrive in the mail than when they buy things in store. Bad news for brick and mortar retailers, good news for all your saved online shopping carts.

Some shopping can ease loneliness
If someone called you materialistic, you might get offended, but materialism is also an economic theory that can help us think about how we shop. There are three key categories: acquisition centrality (shopping is great because it’s shopping), possession-defined success (buying the latest handbag because your coworker has one), and acquisition as a source of happiness (buying something specifically because you believe it can make you happy). If you’re in category three, bad news — shopping might add to your loneliness. However, if you are category one and shopping for what the authors of a 2013 study call “material mirth,” or simple enjoyment of what you’ve purchased, then shopping actually decreased loneliness.

Shopping can even help you live longer
A study of 1,841 elderly Taiwanese people showed that those who shopped daily had a 27 percent lower risk of death than the least frequent shoppers. The study even adjusted for overall health, including physical and cognitive function. The researchers theorized that shopping encompasses “several dimensions of personal well-being, health, and security as well as contributing to the community’s cohesiveness and economy.” Purpose is also a part of mindset, which can be a powerful tool to help you live longer.

But don’t get out your credit card just yet. Although there are positive benefits to your health from shopping, there are a couple of drawbacks to consider.

Shopping can be painful
And no, not just when you try to get your foot into a pair of designer shoes that don’t fit. The dopamine in your brain causes you to feel pleasure as you’re browsing, but your brain gets activated in another way when you contemplate purchasing. In a 2007 study, participants were given prices for items they had been browsing. Two areas of the brain lit up: the prefrontal cortex, which helps you make decisions, and the insula, which helps process pain. Those with the most activity in the insula tended to decide against purchasing. Think about how good it feels to get a deal and how much you hate feeling like what you paid wasn’t worth it. Well, the insula region of the brain is linked to our feelings of disgust and our sense of taste. If you’re not careful in your shopping choices, it can lead a literal bad taste in your mouth.

Shopping can be addictive
The term shopaholic may seem harmless, but for some people, the effects of shopping are anything but. Compulsive Buying Disorder can create a cycle similar to drug abuse or addiction to cigarettes. The dopamine system that gives us those pleasurable moments can also give us too much pleasure, hyper-stimulating our systems and causing us to chase that high again and again. A 2015 study found that those who were prone to shopping addiction were also more likely to suffer from anxiety, depression, and low self-esteem. Agreement with at least four of these statements may signal Compulsive Buying Disorder: you think about shopping all the time; you shop in order to change your mood; you shop to the detriment of your daily obligations (for instance, school or work); you have to shop more and more to obtain the same satisfaction as before; you decided to shop less, but have not been able to; you feel bad if you cannot shop; you shop so much that your well-being is impaired. If a few too many of those sounded like you, talk to a therapist about how you can get help.

Bottom line: like anything, shopping is best done in moderation. So, the next time you indulge in some responsible retail therapy, you might improve your health as you improve your wardrobe.

Camille Acker is a freelance writer living in Chicago and is a co-founder of The Spinsters Union. She is the proud owner of many, many books. See more at camilleacker.com.