A new study finds that physical exercise can help us retain information if it happens at the right time, namely, a few hours after studying, as the new memories are getting stabilized in the brain.

The team of scientists that include researchers from Scotland’s University of Edinburgh and the Netherlands’ Radboud University, divided 72 people into 3 different groups and then had them all complete a task to memorize certain info. The first group was asked to exercise immediately upon the task completion. Another group was asked to wait for 4 hours and then work out. A third group didn’t exercise after studying at all.

Two days later, the participants performed a memory test. The people from the team who’d waited for 4 hours and then worked out, performed nearly 10% better on this test than people from other groups.