Study shows that the presence of friends mitigates the effects of negative experiences