Getting up off your butt and going to the gym to get consistent exercise can be a huge win for most people, but a lot of newbies end up fooling around in a fitness center without any real direction or focus.

And (surprise, surprise) that’s not going to get you any closer to managing your stress, dropping 20lbs, or building bigger pecs and biceps.

Tackling your fitness goals in a group setting, however, may be the key to getting healthier and improving your life, according to a new study published in the Journal of the American Osteopathic Association.

To test their theory that group exercise could be more effective, researchers gave 69 medical students the option to select either a group or self-guided exercise regimen for 12 weeks.

At the conclusion of the study, the researchers found that those in the group regimen (who attended a 30-minute core and functional fitness focus program once a week) had big gains in three "quality of life" meters: 13% better in mental health, 25% better in physical health, and 26% better in emotional health. Those in the individual group (who were allowed to do whatever workouts they wanted), however, only had an 11% increase in the mental health category—even though their average workout ran twice as long as the group-goers.

"The communal benefits of coming together with friends and colleagues, and doing something difficult, while encouraging one another, pays dividends beyond exercising alone," said study head Dayna Yorks, D.O., a researcher at the University of New England College of Osteopathic Medicine. "The findings support the concept of a mental, physical, and emotional approach to health that is necessary for student doctors and physicians."