If you spend too much time in the sun, everyone can see it in your red, burnt skin. But if you get just enough sun exposure, scientists can see it in your poop — at least, according to a new study in the journal Frontiers in Microbiology.

Specifically, the researchers studied people with low Vitamin D to see how they reacted to UV light. This kind of sunlight is one of the main ways our bodies get enough Vitamin D, and the scientists saw that UV exposure didn’t just raise levels of the bone-building compound. It also boosted the participants’ gut microbiome health.

The results suggests that light therapy might one day be beneficial for people with multiple sclerosis or inflammatory bowel disease. Both conditions cope with unbalanced intestinal microbes, which Vitamin D can help modulate. Specific elements of sunlight exposure can increase the body’s Vitamin D production. So the findings indicate that this chain reaction might influence overall gut health, says Else Bosman, a co-author on the paper and researcher at the University of British Columbia.

Ultraviolet B is a form of light that can cause sunburns or increase the risk of skin cancer but also triggers our bodies to make Vitamin D. UV levels can drop at high latitudes — like in Canada. Since insufficient UVB exposure has been linked to the onset of chronic gut inflammation diseases, and because Vitamin D can impact gut microbiome health, Bosman and her research team decided to see how directly all three of these factors influenced one another.

The researchers recruited 21 healthy young women and exposed them to UVB light therapy after they all had been living in Canada for the entire winter and likely hadn’t seen much sun. This kind of treatment already exists in skin care clinics. And researchers know that UVB exposure can calm some patients’ skin problems, like psoriasis or dermatitis, Bosman says. A couple of days before and after the UVB exposures, the researchers took blood samples to assess Vitamin D levels and fecal samples to study the gut microbiome.

Some of the women were already taking Vitamin D supplements. Prior to the light exposure, all but one of the women not taking Vitamin D supplements had insufficient vitamin levels in their blood, whereas the Vitamin D takers had enough. After exposure, the average participant — but not everyone — increased their blood Vitamin D levels. The fecal samples showed that those not taking Vitamin D saw an increase in bacteria health that reached a level on-par with the gut diversity of those taking Vitamin D.

This research is extremely preliminary, Boseman says. That’s because they only looked at the guts of healthy participants, and they relied on the subjects to self-report how much Vitamin D they were taking. The researchers also didn’t assess what kind of nutrients or benefits the gut microbes were putting out — just that they were present. Still, “there’s a lot of research on UV and skin immunity, and not systemic immunity,” Boseman says. This is the first step in that direction.

And while it’s important to be careful with how much you expose your skin to the sun, “planning a trip to Mexico might be good advice from your doctor,” she jokes.