As our social lives have moved onto social media sites like Facebook over the past decade, there’s been a lot of hand-wringing over what all that screen time might be doing to our health. But according to a new paper, time spent on social media could be associated with a longer life. The study asserts that the health effects of active online social lives largely mirror the benefits of busy offline social lives. “We find that people with more friends online are less likely to die than their disconnected counterparts,” the study says. “This evidence contradicts assertions that social media have had a net-negative impact on health.” The study’s methods are detailed at length in the paper, and it was approved by three university and state review boards.

The study was based on 12 million social media profiles made available to the researchers by Facebook, as well as records from the California Department of Health. It found that “moderate use” of Facebook was associated with the lowest mortality rate, and that receiving friend requests correlated with reduced mortality, but that sending friend requests did not. All of the subjects of the study were born from 1945 to 1989.

The paper found that people with large or even average social networks lived longer than people who had very small social networks. It was “a finding consistent with classic studies of offline relationships and longevity,” the release said.

Researchers who had previously found that people with more friends were healthier might have misunderstood the relationship between sociability and health. According to researchers, it may be that “the reason why people with more friends are healthier is because healthier people have more friends,” which would suggest that “it may be harder than we thought it was to use social networks to make people healthier.”

Sociological research into Facebook’s effect on health and happiness has not always been as positive. A study published three years ago found that over a two-week period, the more its subjects used Facebook within in a certain time span, the worse they rated their own happiness within that time span.

It acknowledges the study’s “many limitations,” saying that Facebook is unique among social media websites and that its data might not be more broadly applicable. It also points out that its findings represent a correlative relationship as opposed to a causal one: there is no evidence in the paper that using Facebook has any direct effect on a person’s health.