Need some extra motivation to work out on the weekends, or to opt for a salad over a burger? Then grab a pal, since research suggests adopting healthier habits is easier among friends with similar health characteristics.

In a new study, researchers studied health habits in an online social network. They paired participants of similar age, fitness levels, diet preference, and body mass, and they also matched some participants randomly. After seven weeks, results showed people paired with similar fitness “friends” were three times more likely to make healthier choices than those who were randomly paired.

Here’s one reason why: Researchers surmise peers who have similar health characteristics encourage each other to choose better. Plus, people might see their own behaviors reflected in others. But remember, hanging with friends won’t just magically make us healthier. Other studies have suggested people eat more with friends, and our surroundings can also influence the choices we make. (Seriously, who can pass up a hot dog at a baseball game?!)

So when trying to stay fit and healthy, look for some extra incentive in a circle of friends. The Beatles may in fact have been right— we do get by with a little help from them.