The research, published in the journal Physical Review E, found that in average sized mugs the coffee’s natural frequency was the same as a person’s gait, which caused the liquid to oscillate.

The spillages were most likely between a coffee carrier’s seventh and tenth step, according to Live Science.

Following their discovery, the mechanical engineers had some advice for coffee drinkers.

They said leaving a large gap between the coffee and the top of the drinking vessel, and walking slower, prevents spillages.