HIV diagnoses are coming sooner after infection, increasing physicians’ ability to treat and prevent the spread of HIV, according to a new Centers for Disease Control and Prevention (CDC) Vital Signs report.

As HIV testing has increased, the percentage of people aware of their HIV infection has also steadily grown. As of 2014, 85% of people living with HIV in the United States were aware of their infection. This knowledge allows individuals to seek antiretroviral treatment to suppress the virus, which decreases morbidity and mortality while reducing the risk of sexual transmission to others; knowing one’s HIV status, then, is incredibly important, clinicians say, because people who are unaware that they are HIV positive account for approximately 40% of ongoing transmissions.

“Ideally, HIV is diagnosed within months of infection, rather than years later,” wrote Eugene McCray, MD , director of CDC’s Division of HIV/AIDS Prevention in a statement. “Further increasing regular HIV testing and closing testing, diagnoses, and treatment gaps is essential to stopping HIV in our communities.”

While HIV testing has led to a reduction of HIV infection in the total population, several groups that are at a high risk of HIV infection are not getting tested as often as they should. According to the report , 29% of men who have sex with men, 42% of intravenous drugs users, and 59% of heterosexuals did not report having been tested within the past 12 months. Of the risk groups mentioned, at least two-thirds of people in each group had seen a health care provider in the last year. Heterosexual men are at particular risk of going undiagnosed because they are less likely to see a health care provider. This has led to half of heterosexual men who have HIV going undiagnosed for 5 years or more, the report notes.

Health care providers can improve testing by discussing HIV with patients and explaining that HIV testing is a routine part of any patient’s health care. Physicians should routinely test all patients aged 13-64 years, the CDC says. Testing should be emphasized in patients in high-risk groups; these patients should be tested at least once a year. Sexually active gay and bisexual men should ideally be tested every 3-6 months. Pregnant women, or those looking to become pregnant, should be tested to as soon as possible. If a pregnant woman is in a high-risk population, she should be tested again in the third trimester.

If a patient tests positive for HIV, the CDC report says it is important for clinicians connect them with treatment options and discuss prevention of transmission . The earlier a person begins HIV treatment, the greater the benefits will be. As part of the treatment, clinicians should encourage patients to stay on antiretroviral care to reduce the viral load in the body to either very low (less than 200 copies/mL) or undetectable levels.

“HIV is being diagnosed more quickly, the number of people who have the virus under control is up, and annual infections are down. So while we celebrate our progress, we pledge to work together to end this epidemic forever,” said CDC Director Brenda Fitzgerald, MD, in a statement.