If my spam folder is any indication, there's an international epidemic of erectile dysfunction the likes of which the world has never seen before.

That's not exactly the case, but there is some cause for concern. Ever since ads for Viagra hit the airwaves more than a decade ago, many of us can quote facts about erectile dysfunction (including what you should do if an erection lasts for more than four hours). Long-term ED affects 5 percent of men by age 40. That figure jumps to 25 percent of men by age 65. Young men are often left out of conversations about erectile dysfunction, but they are suffering from ED at rates higher than previously reported.

A recent study found that a quarter of newly-diagnosed patients were young men (defined as younger than 40) and almost half of these young men suffered from severe erectile dysfunction One patient out of four with newly diagnosed erectile dysfunction is a young man—worrisome picture from the everyday clinical practice. Capogrosso P, Colicchia M, Ventimiglia E, et al. The Journal of Sexual Medicine.  2013 Jul;10(7):1833-41. When doctors talk about severe ED, they’re referring to men who find themselves unable to get or maintain an erection during sex.

3 Things That Fuel Flaccidity

There are three main culprits when it comes to erectile dysfunction: physical problems, psychological problems, and problems caused by medication.

Your doctor should advise you if any medication you’re taking could cause you to remain flaccid, even while aroused. So if it’s not medication, your symptoms are likely physical or psychological. Here’s a quick test: If you can get an erection when masturbating or still wake up at full salute, then your troubles are probably psychological. The underlying problem may stem from stress, fatigue, or relationship issues. And then, there's always the potential that you threw back one too many boozy beverages.

A Package Deal

Poor penis function can indicate all kinds of other health problems, including hormonal and vascular disorders.

Hormone disorders, such as hypogandism, can cause the body to produce incredibly low levels of testosterone, which can decrease erectile function. But it’s not just sufferers of bonafide disorders who should be worried about testosterone levels. There’s a strange endemic in modern society: The testosterone levels in young men are decreasing The relative contributions of aging, health, and lifestyle factors to serum testosterone decline in men. Travison TG, Araujo AB, Kupelian V, et al. The Journal of Clinical Endocrinology and Metablolism. 2007 Feb;92(2):549-55..

Testosterone governs men’s libidos, from the number of times they want to have sex to the frequency with which they get an erection. Suffice to say, this hormone is a pretty big deal. And testosterone isn’t just about feeling more like a man—it affects bodily functions, from muscle growth to cardiovascular health.

Erectile dysfunction might also be a warning sign for larger vascular problems. A fully functional heart and a fully functional penis are a package deal. The penis is populated with a collection of arteries. Under normal conditions, when it’s time to perform, a man’s brain alerts the nerves in the penis, the arteries expand, more blood is supplied to the erectile tissue, and the penis becomes engorged with blood.

So ED could indicate larger issues with blood flow throughout the body. Poor blood flow can be attributed to a number of vascular issues, including coronary artery disease, where plaque builds up and can eventually block arteries. This can lead to chest pain and even a full-blown heart attack Prediction of cardiovascular events and all-cause mortality with erectile dysfunction: a systematic review and meta-analysis of cohort studies. Vlachopoulos CV, Terentes-Printzios DG, Ioakeimidis NK. Circulation Cardiovascular Quality and Outcomes. 2013 Jan 1;6(1):99-109..

The Lifestyle Rx to Prevent ED

Don’t fall for the “erectile enhancement” ads that end up in your spam folder, and be wary of ads for prescription pills to treat ED. Nearly one-fifth of the more than 18 million men affected by erectile dysfunction opt to take prescription drugs, such as Viagra and Cialis. But popping pills isn’t the right option for everyone with ED. You can boost testosterone levels while also improving cardiovascular health with the exact same lifestyle change. The basic prescription? Exercise (with weights!) and watch what you eat.

Recent research has shown that men who are physically active have better erectile function Exercise protects the cardiovascular system: effects beyond traditional risk factors. Joyner MJ, Green DJ. The Journal of Physiology. 2009 Dec 1;587(Pt 23):5551-8.. Weight training can also increase testosterone levels and improve cardiovascular health, two key components to thwarting erectile dysfunction Acute testosterone and cortisol responses to high power resistance exercise. Fry AC, Lohnes CA. Human Physiology. 2010 Jul-Aug;36(4):102-6..

The effects of simple diet and exercise on patients with ED are remarkable. In one study, obese men with ED were put on a calorie-restricted diet for two years and were advised to be more physically active. Not only did these men lose a lot of weight, the severity of their ED also decreased Effect of lifestyle changes on erectile dysfunction in obese men: a randomized controlled trial.  Esposito K, Giugliano F, Di Palo C, et al. JAMA: The Journal of the American Medical Association. 2004 Jun 23;291(24):2978-84.. Another study found that exercise helps with erectile function, even if you don’t adhere to a healthy diet Exercise is associated with better erectile function in men under 40 as evaluated by the International Index of Erectile Function. Hsiao W, Shrewsberry AB, Moses KA, et al. The Journal of Sexual Medicine. 2012 Feb;9(2):524-30.. The only caveat: If you eat lots of junk food, you’ll need a higher level of physical activity to ensure erectile function and cardio protection.

Don’t Be Afraid to Talk About Your Penis

Listen, guys: If there’s one thing you should take away from this article, it’s that erectile dysfunction isn’t just an issue for the retirement set. It’s an issue that can affect 20-something men too. If you suspect you might be suffering from ED, talk to your doctor about the issue. More than likely, your doctor will prescribe lifestyle changes, including a healthier diet and more exercise. But you’ll also be making sure your penis problem isn’t indicating more serious health issues.

This article was originally produced as part of 75toGo, a project to publish research-intensive health and fitness stories for twentysomethings looking to create good practices and habits for the decades ahead.

READ THIS NEXT: Everything You Need to Know About Male and Female Erogenous Zones 34U34 Mental Health Promo