It’s a common problem: You tie your shoelaces, but before you know it, they’ve come undone. Why? A team led by Oliver O’Reilly, a mechanical engineer at the University of California, Berkeley, may have unraveled the mystery.

The researchers used a high-speed camera and motion sensors called accelerometers to study how people’s movements cause laces to loosen. They found that the impact of a person’s feet striking the ground gradually weakens shoelaces’ knots. And swinging of the legs creates forces that tug at the laces’ ends.

A stronger knot can help laces stay in place longer, says O’Reilly, but “the combination of forces means that most knots will eventually come undone.”