Family is important—but good friendships may be more important for your health and happiness in the long run, according to a pair of studies from Michigan State University.

To be clear, we’re talking good friendships. Just as you do with deadlifts, you should aim for quality—not quantity—when it comes to your close friends.

Study author William Chopik, an assistant professor of psychology, analyzed data from two surveys of almost 280,000 people. The first study found that both family and friends make us happy, but that friendships were a stronger predictor of well-being at later ages. The second found that people whose friendships resulted in stress reported more chronic illnesses compared to people whose friends were their support system.

“Friendships become even more important as we age,” Chopik told MSU Today. “Keeping a few really good friends around can make a world of difference for our health and well-being. So it’s smart to invest in the friendships that make you happiest.”

As the old saying goes, “You can choose your friends, but you can’t choose your family.” And that may be why friendships seem to become more important as life goes on, according to Chopik. Because we tend to keep the friends we like and cut ties with those we don’t, friendships are more likely to make us feel good. Even though family relationships are often a source of happiness, you’re stuck taking the serious, monotonous, or downright bad things along with the good.

“Friendships,” on the other hand, “help us stave off loneliness, but are often harder to maintain across the lifespan,” he says. “If a friendship has survived the test of time, you know it must be a good one—a person you turn to for help and advice often, and a person you wanted in your life.”