If you want to avoid party fouls, order a Guinness.

According to a study by a couple of very chill physicists at Princeton University, the more foam a beer has, the less likely it is to spill. The scientists used high-speed cameras to record how glasses of coffee, amber beer and Guinness react to sudden jolts. They concluded that the foam acts like insulation, absorbing the motion and preventing the liquid from sloshing around. And the thicker the head of bubbles, the better.

Watch more about the scientists’ study below:

(via Smithsonian)

Alyson Sheppard is the resident hangover specialist at Playboy.com. Follow her on Twitter: @amshep