Moving affects children differently depending on age, according to study