Insurer American International Group Inc on Thursday reported a quarterly profit that beat estimates, as the company booked an underwriting income in its general insurance business.

AIG, one of the largest insurers in the United States, posted an underwriting income of $12 million in its general insurance business for the quarter, compared with a loss of $1.07 billion, a year earlier.

Underwriting income is the difference between premiums an insurer collects on policies and claims it pays out.

Net pre-tax catastrophe loss at the general insurance unit narrowed to $411 million from $826 million, a year earlier.

AIG is in the midst of a turnaround effort launched by Chief Executive Officer Brian Duperreault, who joined the insurer in 2017.

Duperreault has been overhauling the underwriting culture at AIG‘s general insurance business, through initiatives including raising rates and shedding unprofitable lines.

AIG‘s general insurance business posted an underwriting profit in the first quarter of 2019, the first since 2007.

Total net investment income rose 30% to $3.6 billion in the reported quarter.

AIG‘s general insurance accident year combined ratio, a key metric, which excludes changes from losses incurred in past years was 95.8 for the quarter, compared with 98.8 a year earlier.

A ratio below 100 means the insurer earned more in premiums than it paid out in claims.

Net income attributable to the company’s shareholders was $922 million, or $1.03 per share, in the fourth quarter ended Dec. 31, compared to a loss of $622 million, or 70 cents per share, a year earlier.

On an adjusted basis, AIG earned $1.03 per share, beating Refinitiv estimates of $1.00.

The insurer also said it expects to pay $1.7 billion as part of a tax settlement with the U.S. Internal Revenue Service, which could be made as early as the first quarter of 2020.

The settlement amount, which AIG had previously disclosed, is related to cross-border financing transactions dating back to 1997.