Science has finally figured out what we can do to keep from spilling our coffee: Walk more slowly, and don’t fill the cup so high.

OK, so they pretty much just proved common sense right, but University of California mechanical engineer Rouslan Krechetnikov and grad student Hans Mayer recently published the results of a study investigating the mechanics of walking with a cup of coffee.

The duo was inspired by watching participants at a conference last year spill coffee on themselves while trying to quickly get to events about fluid dynamics.

For their experiment, they had test subjects walk at different speeds in a straight line while holding a cup of coffee. Sometimes participants were asked to focus on the coffee mug, and other times to look straight ahead.

While the end result was that spills could be prevented by walking slowly, not filling the cup too high, and watching to make sure it doesn't spill, the research proves that the physics of coffee sloshing is actually pretty complicated. Part of the issue involves the mechanics of walking, which varies from person to person, and the rest depends on the physics of liquid sloshing.

According to The Huffington Post, Lei Ren, a specialist in the biomechanics of walking at the University of Manchester, described the study as "very cool." "It reveals the sophisticated interplay between human body dynamics and the fluid mechanics of spilling coffee."

Physicist Matthew Turner said the research could advance mug design technology, allowing cup engineers to improve slosh control techniques, but he doubts mug makers will actually bother to do so.

"I expect it is more cost-effective for manufacturers to just provide a lid," he said.