NEW YORK (CBSNewYork) — There’s good news for those who don’t mind indulging in the occasional cup of coffee or glass of wine.

It might just help you live longer, according to a new study.

Researchers at the University of California-Irvine examined the lifestyles of people 90 and older in hopes of unlocking the secrets to a long life.

They found those who drank moderate amounts of alcohol or coffee lived longer than people who abstained, while also lowering their chances of premature death by 18 percent.

Researchers caution you should still maintain an active lifestyle and eat healthy foods.