CVS Health (CVS) reported better-than-expected results for its second quarter, as revenue benefited from last year’s acquisition of insurance company Aetna, prompting the pharmacy to raise its earnings outlook.

Adjusted earnings came in at $1.89 a share, up from $1.69 a share a year earlier, while the consensus on Capital IQ was for $1.69 a share, the company said on Wednesday. Revenue rose to $64.4 billion from $46.9 billion in the same period of last year, while the Street was looking for $62.7 billion.

“We posted strong second quarter results, with all of our businesses performing at or above expectations,” said Larry Merlo, the company’s chief executive.

Revenue in the pharmacy services segment increased to $34.84 billion from $33.43 billion a year before, with the gain attributed to inflation in brand-name drug prices and volume in total pharmacy claims. That was partly offset by “continued price compression and an increased generic dispensing rate,” CVS said.

In the retail and long-term care segment, revenue rose to $21.45 billion from $20.67 billion a year earlier, the company said, with inflation in drug prices and higher prescription volumes “partially offset by continued reimbursement pressure and the impact of generic drug introductions.”

Woonsocket, RI-based CVS finalized its acquisition of Aetna last November. In the second quarter, the health-care benefits segment saw revenue jumped to $17.4 billion from just $764 million previously. Before the deal, the benefits group consisted only of its Medicare prescription-drug plan.