For years scientists have believed that when it comes to weight gain, all calories are created equal.

But an intriguing new study, published in the journal Nature Communications, suggests that’s not true. The body appears to react differently to calories ingested from high-fiber whole foods vs. ultra-processed junk foods.

The reason? Cheap processed foods are more quickly absorbed in your upper gastrointestinal tract, which means more calories for your body and fewer for your gut microbiome, which is located near the end of your digestive tract. But when we eat high-fiber foods, they aren’t absorbed as easily, so they make the full journey down your digestive tract to your large intestine, where the trillions of bacteria that make up your gut microbiome are waiting.