Mixing up a workout routine may improve the brain’s ability to rewire itself, a new review suggests.

As little as 20 minutes of interval training or 25 minutes of continuous moderate aerobic exercise were the sweet spots for improved neuroplasticity, in which the brain is able to rewire, or reroute around areas that no longer function so well, wrote Ashleigh E. Smith, of the University of South Australia, and colleagues.

Growing evidence shows that aerobic exercise helps preserve cognitive health. A variety of research labs are attempting to nail down an effective clinical exercise prescription. In the Smith study referred to above, researchers reviewed recent experiments involving 128 people who participated in exercises that varied in intensity. All participants underwent brain monitoring.

Taken as a whole, these studies show that the brain benefits from both high intensity interval training and longer, continuous bouts of moderate exercise, Smith concluded.

Full findings was published in the Journal of Science and Medicine in Sport.