factors that affect longevity