Although passing gas is a fact of life, there are times when you may want to reduce your chances of clearing a room or creating a biohazard situation in an elevator.

Fortunately, a new study offers up some helpful advice. Researchers at Monash University in Melbourne, Australia, recently examined how different foods can affect the amount of hydrogen sulfide produced by bacteria in the gut. While farts are made up of several different gases—oxygen, nitrogen, methane, carbon dioxide, and hydrogen—it’s the hydrogen sulfide that’s responsible for making your wind smell like a carton of eggs left to rot in the sun.

In order to discover how the gas interacts with feces, the scientists gathered the poop of seven healthy volunteers and then mixed it with components commonly found in both meat and carbohydrates to see which produced more of the odor-causing gas. The result? Cysteine, an amino acid found in meat, eggs, and other protein-heavy foods, increased the hydrogen sulfide sevenfold.

But when they mixed the waste with fructans and resistant starch, production of the sulfide was reduced by 75 percent.

In other words, your typical bodybuilder’s diet that’s high in protein is likely to make for a terrible post-workout car ride. If you plan on being in a situation where a malignant toot would be socially crippling, you might want to ease up on the eggs and instead opt for carbs like bananas, potatoes, wheat, or vegetables like artichokes and asparagus.

According to lead study author Chu Yao, the biggest takeaway from the research would be not to avoid fiber for fear you’ll suffer from gas. While fart production might increase, fiber soaking up water in the intestine helps knock out the sulfide and reduce the smell.

“The concerning thing is that there are all these people walking around constipated because they are too scared to eat fiber in case they do a bad fart,” Yao told New Scientist.

[h/t New Scientist]