XML 73 R17.htm IDEA: XBRL DOCUMENT
v3.22.4

LOANS | 12 Months Ended
--- | ---
Dec. 31, 2022
LOANS |
LOANS | 8. LOANS The loans receivable portfolio is segmented into commercial, residential mortgage and consumer loans. Loans outstanding at December 31, 2022 and December 31, 2021 are summarized by segment, and by classes within each segment, as follows: ​ Summary of Loans by Type (In Thousands) ​
​ | ​ | ​ | ​ | ​ | ​ | ​
​ |  | December 31, |  | December 31,
​ |  | 2022 | ​ | 2021
Commercial: | ​ |  |  | ​ |  |
Commercial loans secured by real estate | ​ | $ | 682,249 | ​ | $ | 569,840
Commercial and industrial | ​ |  | 178,271 | ​ |  | 159,073
Paycheck Protection Program - 1st Draw | ​ | ​ | 5 | ​ | ​ | 1,356
Paycheck Protection Program - 2nd Draw | ​ | ​ | 163 | ​ | ​ | 25,508
Political subdivisions | ​ |  | 90,719 | ​ |  | 81,301
Commercial construction and land | ​ |  | 73,963 | ​ |  | 60,579
Loans secured by farmland | ​ |  | 12,950 | ​ |  | 11,121
Multi-family (5 or more) residential | ​ |  | 55,886 | ​ |  | 50,089
Agricultural loans | ​ |  | 2,435 | ​ |  | 2,351
Other commercial loans | ​ |  | 14,857 | ​ |  | 17,153
Total commercial | ​ |  | 1,111,498 | ​ |  | 978,371
Residential mortgage: | ​ | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 509,782 | ​ | ​ | 483,629
Residential mortgage loans - junior liens | ​ |  | 24,949 | ​ |  | 23,314
Home equity lines of credit | ​ |  | 43,798 | ​ |  | 39,252
1-4 Family residential construction | ​ |  | 30,577 | ​ |  | 23,151
Total residential mortgage | ​ |  | 609,106 | ​ |  | 569,346
Consumer | ​ |  | 19,436 | ​ |  | 17,132
Total | ​ |  | 1,740,040 | ​ |  | 1,564,849
Less: allowance for loan losses | ​ |  | (16,615) | ​ |  | (13,537)
Loans, net | ​ | $ | 1,723,425 | ​ | $ | 1,551,312
​ In the table above, outstanding loan balances are presented net of deferred loan origination fees of $4,725,000 at December 31, 2022 and $4,247,000 at December 31, 2021. The Corporation grants loans to individuals as well as commercial and tax-exempt entities. Commercial, residential and personal loans are made to customers geographically concentrated in Northcentral Pennsylvania, the Southern tier of New York State, Southeastern Pennsylvania and Southcentral Pennsylvania. Although the Corporation has a diversified loan portfolio, a significant portion of its debtors’ ability to honor their contracts is dependent on the local economic conditions within the region. On March 27, 2020, the Coronavirus Aid, Relief, and Economic Security Act (the “CARES Act”) was signed into law. The CARES Act is a $2 trillion stimulus package designed to provide relief to U.S. businesses and consumers struggling as a result of the pandemic. A provision in the CARES Act includes creation of the Paycheck Protection Program (“PPP”) through the Small Business Administration (“SBA”) and Treasury Department. Under the PPP, the Corporation, as an SBA-certified lender, provided SBA-guaranteed loans to small businesses to pay their employees, rent, mortgage interest, and utilities. PPP loans are forgiven subject to clients’ providing documentation evidencing their compliant use of funds and otherwise complying with the terms of the program. Information related to PPP loans advanced pursuant to the CARES Act are labeled “1st Draw” within the tables. On December 27, 2020, the President of the United States signed into law the Consolidated Appropriations Act, 2021 (the “CAA”), which includes provisions that broadly address additional COVID-19 responses and relief. Among the additional relief measures included are certain extensions to elements of the CARES Act, including extension of relief from troubled debt restructurings reporting established under Section 4013 of the CARES Act to 60 days after the date on which the national COVID-19 emergency terminates. The CAA also included additional funding for the PPP with additional eligibility requirements for borrowers with generally the same loan terms as provided under the CARES Act. Information related to PPP loans advanced pursuant to the CAA are labeled “2nd Draw” within the tables. The maximum term of PPP loans is five years. Most of the Corporation’s 1st Draw PPP loans have two-year terms, while 2nd Draw PPP loans have five-year terms and the Corporation is repaid sooner to the extent the loans are forgiven. The interest rate on PPP loans is 1%, and the Corporation has received fees from the SBA ranging between 1% and 5% per loan, depending on the size of the loan. Fees on PPP loans, net of origination costs and a market rate adjustment on acquired PPP loans, are recognized in interest income as a yield adjustment over the term of the loans. As of December 31, 2022, the recorded investment in PPP loans was $168,000, including contractual principal balances of $195,000, reduced by net deferred origination fees of $27,000. Interest and fees on PPP loans which are included in taxable interest and fees on loans in the consolidated statements of income totaled $958,000 in 2022, $6,530,000 in 2021 and $2,924,000 in 2020. Loans acquired in business combinations were recorded at their initial fair value, with adjustments made to the gross amortized cost of loans based on movements in interest rates (market rate adjustment) and based on credit fair value adjustments on non-impaired loans and impaired loans. Subsequent to the acquisitions, the Corporation has recognized amortization and accretion of a portion of the market rate adjustments and credit adjustments on non-impaired (performing) loans, and a partial recovery of purchased credit impaired (PCI) loans. For the years ended December 31, 2022 and 2021, adjustments to the initial market rate and credit fair value adjustments of performing loans were recognized as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | Year Ended
​ | ​ | December 31, | ​ | December 31,
​ | ​ | 2022 | ​ | 2021
Market Rate Adjustment |  | ​ |  |  | ​ |
Adjustments to gross amortized cost of loans at beginning of period | ​ | $ | (637) | ​ | $ | 718
Amortization recognized in interest income | ​ | ​ | (279) | ​ | ​ | (1,355)
Adjustments to gross amortized cost of loans at end of period | ​ | $ | (916) | ​ | $ | (637)
Credit Adjustment on Non-impaired Loans | ​ | ​ | ​ | ​ | ​ | ​
Adjustments to gross amortized cost of loans at beginning of period | ​ | $ | (3,335) | ​ | $ | (5,979)
Accretion recognized in interest income | ​ |  | 1,495 | ​ |  | 2,644
Adjustments to gross amortized cost of loans at end of period | ​ | $ | (1,840) | ​ | $ | (3,335)
​ A summary of PCI loans held at December 31, 2022 and December 31, 2021 is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | December 31, | ​ | December 31,
​ |  | 2022 |  | 2021
Outstanding balance | ​ | $ | 1,833 | ​ | $ | 9,802
Carrying amount | ​ |  | 1,027 | ​ |  | 6,558
​ Transactions within the allowance for loan losses, summarized by segment and class, were as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
​ |  | December 31, |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | December 31,
Year Ended December 31, 2022 | ​ | 2021 | ​ | ​ | ​ | ​ | ​ | ​ | ​ | Provision | ​ | 2022
(In Thousands) | ​ | Balance | ​ | Charge-offs | ​ | Recoveries | ​ | (Credit) | ​ | Balance
Allowance for Loan Losses: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial: | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |
Commercial loans secured by real estate | ​ | $ | 4,405 | ​ | $ | (3,942) | ​ | $ | 0 | ​ | $ | 6,611 | ​ | $ | 7,074
Commercial and industrial | ​ |  | 2,723 | ​ |  | (150) | ​ |  | 0 | ​ |  | 336 | ​ |  | 2,909
Commercial construction and land | ​ |  | 637 | ​ |  | 0 | ​ |  | 0 | ​ |  | 10 | ​ |  | 647
Loans secured by farmland | ​ |  | 115 | ​ |  | 0 | ​ |  | 0 | ​ |  | (3) | ​ |  | 112
Multi-family (5 or more) residential | ​ |  | 215 | ​ |  | 0 | ​ |  | 0 | ​ |  | 196 | ​ |  | 411
Agricultural loans | ​ |  | 25 | ​ |  | 0 | ​ |  | 0 | ​ |  | (4) | ​ |  | 21
Other commercial loans | ​ |  | 173 | ​ |  | 0 | ​ |  | 0 | ​ |  | (49) | ​ |  | 124
Total commercial | ​ |  | 8,293 | ​ |  | (4,092) | ​ |  | 0 | ​ |  | 7,097 | ​ |  | 11,298
Residential mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 3,650 | ​ | ​ | 0 | ​ | ​ | 4 | ​ | ​ | (241) | ​ | ​ | 3,413
Residential mortgage loans - junior liens | ​ |  | 184 | ​ |  | 0 | ​ |  | 0 | ​ |  | (17) | ​ |  | 167
Home equity lines of credit | ​ |  | 302 | ​ |  | 0 | ​ |  | 15 | ​ |  | (35) | ​ |  | 282
1-4 Family residential construction | ​ |  | 202 | ​ |  | 0 | ​ |  | 0 | ​ |  | 9 | ​ |  | 211
Total residential mortgage | ​ |  | 4,338 | ​ |  | 0 | ​ |  | 19 | ​ |  | (284) | ​ |  | 4,073
Consumer | ​ |  | 235 | ​ |  | (153) | ​ |  | 49 | ​ |  | 113 | ​ |  | 244
Unallocated | ​ |  | 671 | ​ |  | 0 | ​ |  | 0 | ​ |  | 329 | ​ |  | 1,000
Total Allowance for Loan Losses | ​ | $ | 13,537 | ​ | $ | (4,245) | ​ | $ | 68 | ​ | $ | 7,255 | ​ | $ | 16,615
​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
​ |  | December 31, |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | December 31,
Year Ended December 31, 2021 | ​ | 2020 | ​ | ​ | ​ | ​ | ​ | ​ | ​ | Provision | ​ | 2021
(In Thousands) | ​ | Balance | ​ | Charge-offs | ​ | Recoveries | ​ | (Credit) | ​ | Balance
Allowance for Loan Losses: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  |
Commercial loans secured by real estate | ​ | $ | 3,051 | ​ | $ | 0 | ​ | $ | 2 | ​ | $ | 1,352 | ​ | $ | 4,405
Commercial and industrial | ​ |  | 2,245 | ​ |  | (1,464) | ​ |  | 20 | ​ |  | 1,922 | ​ |  | 2,723
Commercial construction and land | ​ |  | 454 | ​ |  | 0 | ​ |  | 0 | ​ |  | 183 | ​ |  | 637
Loans secured by farmland | ​ |  | 120 | ​ |  | 0 | ​ |  | 0 | ​ |  | (5) | ​ |  | 115
Multi-family (5 or more) residential | ​ |  | 236 | ​ |  | 0 | ​ |  | 0 | ​ |  | (21) | ​ |  | 215
Agricultural loans | ​ |  | 34 | ​ |  | 0 | ​ |  | 0 | ​ |  | (9) | ​ |  | 25
Other commercial loans | ​ |  | 168 | ​ |  | 0 | ​ |  | 0 | ​ |  | 5 | ​ |  | 173
Total commercial | ​ |  | 6,308 | ​ |  | (1,464) | ​ |  | 22 | ​ |  | 3,427 | ​ |  | 8,293
Residential mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 3,524 | ​ | ​ | (11) | ​ | ​ | 4 | ​ | ​ | 133 | ​ | ​ | 3,650
Residential mortgage loans - junior liens | ​ |  | 349 | ​ |  | 0 | ​ |  | 0 | ​ |  | (165) | ​ |  | 184
Home equity lines of credit | ​ |  | 281 | ​ |  | 0 | ​ |  | 2 | ​ |  | 19 | ​ |  | 302
1-4 Family residential construction | ​ |  | 99 | ​ |  | 0 | ​ |  | 0 | ​ |  | 103 | ​ |  | 202
Total residential mortgage | ​ |  | 4,253 | ​ |  | (11) | ​ |  | 6 | ​ |  | 90 | ​ |  | 4,338
Consumer | ​ |  | 239 | ​ |  | (100) | ​ |  | 38 | ​ |  | 58 | ​ |  | 235
Unallocated | ​ |  | 585 | ​ |  | 0 | ​ |  | 0 | ​ |  | 86 | ​ |  | 671
Total Allowance for Loan Losses | ​ | $ | 11,385 | ​ | $ | (1,575) | ​ | $ | 66 | ​ | $ | 3,661 | ​ | $ | 13,537
​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
​ |  | December 31, |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | December 31,
Year Ended December 31, 2020 | ​ | 2019 | ​ | ​ | ​ | ​ | ​ | ​ | ​ | Provision | ​ | 2020
(In Thousands) | ​ | Balance | ​ | Charge-offs | ​ | Recoveries | ​ | (Credit) | ​ | Balance
Allowance for Loan Losses: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  |
Commercial loans secured by real estate | ​ | $ | 1,921 | ​ | $ | 0 | ​ | $ | 0 | ​ | $ | 1,130 | ​ | $ | 3,051
Commercial and industrial | ​ |  | 1,391 | ​ |  | (2,236) | ​ |  | 16 | ​ |  | 3,074 | ​ |  | 2,245
Commercial construction and land | ​ |  | 966 | ​ |  | (107) | ​ |  | 0 | ​ |  | (405) | ​ |  | 454
Loans secured by farmland | ​ |  | 158 | ​ |  | 0 | ​ |  | 0 | ​ |  | (38) | ​ |  | 120
Multi-family (5 or more) residential | ​ |  | 156 | ​ |  | 0 | ​ |  | 0 | ​ |  | 80 | ​ |  | 236
Agricultural loans | ​ |  | 41 | ​ |  | 0 | ​ |  | 0 | ​ |  | (7) | ​ |  | 34
Other commercial loans | ​ |  | 155 | ​ |  | 0 | ​ |  | 0 | ​ |  | 13 | ​ |  | 168
Total commercial | ​ |  | 4,788 | ​ |  | (2,343) | ​ |  | 16 | ​ |  | 3,847 | ​ |  | 6,308
Residential mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 3,405 | ​ | ​ | 0 | ​ | ​ | 39 | ​ | ​ | 80 | ​ | ​ | 3,524
Residential mortgage loans - junior liens | ​ |  | 384 | ​ |  | 0 | ​ |  | 1 | ​ |  | (36) | ​ |  | 349
Home equity lines of credit | ​ |  | 276 | ​ |  | 0 | ​ |  | 4 | ​ |  | 1 | ​ |  | 281
1-4 Family residential construction | ​ |  | 117 | ​ |  | 0 | ​ |  | 0 | ​ |  | (18) | ​ |  | 99
Total residential mortgage | ​ |  | 4,182 | ​ |  | 0 | ​ |  | 44 | ​ |  | 27 | ​ |  | 4,253
Consumer | ​ |  | 281 | ​ |  | (122) | ​ |  | 41 | ​ |  | 39 | ​ |  | 239
Unallocated | ​ |  | 585 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 585
Total Allowance for Loan Losses | ​ | $ | 9,836 | ​ | $ | (2,465) | ​ | $ | 101 | ​ | $ | 3,913 | ​ | $ | 11,385
​ For the year ended December 31, 2022, the provision for loan losses was $7,255,000, an increase in expense of $3,594,000 as compared to $3,661,000 recorded in the year ended December 31, 2021. The provision for 2022 includes $3,890,000 related to specific loans (net charge-offs of $4,177,000 and net decrease in specific allowances on loans of $287,000), an increase of $3,036,000 in the collectively determined portion of the allowance and a $329,000 increase in the unallocated portion. In 2022, the provision for loan losses includes the impact of partial charge-offs totaling $3,942,000 on a commercial real estate secured participation loan to a borrower in the health care industry. The charge-offs resulted from the borrower’s default due to deterioration in financial performance. The recorded investment in the loan at December 31, 2022 (principal balance, net of partial charge-offs) was $2,654,000 based on a settlement agreement reached with the borrower. The provision for loan losses in 2021 includes $1,324,000 related to specific loans (net charge-offs of $1,509,000 and a decrease in specific allowances on loans of $185,000), an increase of $2,251,000 in the collectively determined portion of the allowance and an $86,000 increase in the unallocated portion. In 2020, the provision included a $2,219,000 charge-off on one commercial loan. In determining the larger loan relationships for detailed assessment under the specific allowance component, the Corporation uses an internal risk rating system. Under the risk rating system, the Corporation classifies problem or potential problem loans as “Special Mention,” “Substandard,” or “Doubtful” on the basis of currently existing facts, conditions and values. Loans that do not currently expose the Corporation to sufficient risk to warrant classification as Substandard or Doubtful, but possess weaknesses that deserve management’s close attention, are deemed to be Special Mention. Substandard loans include those characterized by the distinct possibility that the Corporation will sustain some loss if the deficiencies are not corrected. Loans classified as Doubtful have all the weaknesses inherent in those classified as Substandard with the added characteristic that the weaknesses present make collection or liquidation in full, on the basis of currently existing facts, conditions and values, highly questionable and improbable. Risk ratings are updated any time that conditions or the situation warrants. Loans not classified are included in the “Pass” column in the table that follows. ​ The following tables summarize the aggregate credit quality classification of outstanding loans by risk rating as of December 31, 2022 and 2021: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
December 31, 2022 |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | Purchased |  | ​ | ​
(In Thousands) | ​ | ​ | ​ | ​ | Special | ​ | ​ | ​ | ​ | ​ | ​ | ​ | Credit | ​ | ​ | ​
​ | ​ | Pass | ​ | Mention | ​ | Substandard | ​ | Doubtful | ​ | Impaired | ​ | Total
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial loans secured by real estate | ​ | $ | 666,442 | ​ | $ | 4,589 | ​ | $ | 10,231 | ​ | $ | 0 | ​ | $ | 987 | ​ | $ | 682,249
Commercial and Industrial | ​ |  | 156,042 | ​ |  | 910 | ​ |  | 21,279 | ​ |  | 0 | ​ |  | 40 | ​ |  | 178,271
Paycheck Protection Program - 1st Draw | ​ | ​ | 5 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 5
Paycheck Protection Program - 2nd Draw | ​ | ​ | 163 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 163
Political subdivisions | ​ |  | 90,719 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 90,719
Commercial construction and land | ​ |  | 73,179 | ​ |  | 517 | ​ |  | 267 | ​ |  | 0 | ​ |  | 0 | ​ |  | 73,963
Loans secured by farmland | ​ |  | 11,136 | ​ |  | 519 | ​ |  | 1,295 | ​ |  | 0 | ​ |  | 0 | ​ |  | 12,950
Multi-family (5 or more) residential | ​ |  | 55,034 | ​ |  | 0 | ​ |  | 852 | ​ |  | 0 | ​ |  | 0 | ​ |  | 55,886
Agricultural loans | ​ |  | 1,831 | ​ |  | 28 | ​ |  | 576 | ​ |  | 0 | ​ |  | 0 | ​ |  | 2,435
Other commercial loans | ​ |  | 14,857 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 14,857
Total commercial | ​ |  | 1,069,408 | ​ |  | 6,563 | ​ |  | 34,500 | ​ |  | 0 | ​ |  | 1,027 | ​ |  | 1,111,498
Residential Mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 496,156 | ​ | ​ | 7,125 | ​ | ​ | 6,501 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 509,782
Residential mortgage loans - junior liens | ​ |  | 24,495 | ​ |  | 164 | ​ |  | 290 | ​ |  | 0 | ​ |  | 0 | ​ |  | 24,949
Home equity lines of credit | ​ |  | 43,289 | ​ |  | 59 | ​ |  | 450 | ​ |  | 0 | ​ |  | 0 | ​ |  | 43,798
1-4 Family residential construction | ​ |  | 30,577 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 30,577
Total residential mortgage | ​ |  | 594,517 | ​ |  | 7,348 | ​ |  | 7,241 | ​ |  | 0 | ​ |  | 0 | ​ |  | 609,106
Consumer | ​ |  | 19,350 | ​ |  | 0 | ​ |  | 86 | ​ |  | 0 | ​ |  | 0 | ​ |  | 19,436
Totals | ​ | $ | 1,683,275 | ​ | $ | 13,911 | ​ | $ | 41,827 | ​ | $ | 0 | ​ | $ | 1,027 | ​ | $ | 1,740,040
​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
December 31, 2021 |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | Purchased |  | ​ | ​
(In Thousands) | ​ | ​ | ​ | ​ | Special | ​ | ​ | ​ | ​ | ​ | ​ | ​ | Credit | ​ | ​ | ​
​ | ​ | Pass | ​ | Mention | ​ | Substandard | ​ | Doubtful | ​ | Impaired | ​ | Total
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial loans secured by real estate | ​ | $ | 538,966 | ​ | $ | 10,510 | ​ | $ | 16,220 | ​ | $ | 0 | ​ | $ | 4,144 | ​ | $ | 569,840
Commercial and Industrial | ​ |  | 142,775 | ​ |  | 10,841 | ​ |  | 4,694 | ​ |  | 0 | ​ |  | 763 | ​ |  | 159,073
Paycheck Protection Program - 1st Draw | ​ | ​ | 1,356 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 1,356
Paycheck Protection Program - 2nd Draw | ​ | ​ | 25,508 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 25,508
Political subdivisions | ​ |  | 81,301 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 81,301
Commercial construction and land | ​ |  | 59,816 | ​ |  | 715 | ​ |  | 48 | ​ |  | 0 | ​ |  | 0 | ​ |  | 60,579
Loans secured by farmland | ​ |  | 10,011 | ​ |  | 186 | ​ |  | 924 | ​ |  | 0 | ​ |  | 0 | ​ |  | 11,121
Multi-family (5 or more) residential | ​ |  | 47,638 | ​ |  | 0 | ​ |  | 873 | ​ |  | 0 | ​ |  | 1,578 | ​ |  | 50,089
Agricultural loans | ​ |  | 1,802 | ​ |  | 0 | ​ |  | 549 | ​ |  | 0 | ​ |  | 0 | ​ |  | 2,351
Other commercial loans | ​ |  | 17,150 | ​ |  | 3 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 17,153
Total commercial | ​ |  | 926,323 | ​ |  | 22,255 | ​ |  | 23,308 | ​ |  | 0 | ​ |  | 6,485 | ​ |  | 978,371
Residential Mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 469,044 | ​ | ​ | 7,981 | ​ | ​ | 6,534 | ​ | ​ | 0 | ​ | ​ | 70 | ​ | ​ | 483,629
Residential mortgage loans - junior liens | ​ |  | 22,914 | ​ |  | 114 | ​ |  | 283 | ​ |  | 0 | ​ |  | 3 | ​ |  | 23,314
Home equity lines of credit | ​ |  | 38,652 | ​ |  | 59 | ​ |  | 541 | ​ |  | 0 | ​ |  | 0 | ​ |  | 39,252
1-4 Family residential construction | ​ |  | 23,151 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0 | ​ |  | 23,151
Total residential mortgage | ​ |  | 553,761 | ​ |  | 8,154 | ​ |  | 7,358 | ​ |  | 0 | ​ |  | 73 | ​ |  | 569,346
Consumer | ​ |  | 17,092 | ​ |  | 0 | ​ |  | 40 | ​ |  | 0 | ​ |  | 0 | ​ |  | 17,132
Totals | ​ | $ | 1,497,176 | ​ | $ | 30,409 | ​ | $ | 30,706 | ​ | $ | 0 | ​ | $ | 6,558 | ​ | $ | 1,564,849
​ The increase in substandard loans at December 31, 2022 as compared to December 31, 2021 includes advances under lines of credit to a commercial borrower totaling $10,799,000 at December 31, 2022, which were classified as impaired and nonaccrual. Based on an analysis of the liquidation value of business assets that collateralize the lines of credit, there was no specific allowance related to these advances at December 31, 2022. ​ The following tables present a summary of loan balances and the related allowance for loan losses summarized by portfolio segment and class for each impairment method used as of December 31, 2022 and 2021: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
December 31, 2022 |  | Loans: | ​ | Allowance for Loan Losses:
(In Thousands) | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
​ | ​ | Individually | ​ | Collectively | ​ | ​ | ​ | ​ | Individually | ​ | Collectively | ​ |  | ​
​ |  | Evaluated |  | Evaluated |  | Totals |  | Evaluated |  | Evaluated |  | Totals
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial loans secured by real estate | ​ | $ | 7,154 | ​ | $ | 675,095 | ​ | $ | 682,249 | ​ | $ | 427 | ​ | $ | 6,647 | ​ | $ | 7,074
Commercial and industrial | ​ |  | 11,223 | ​ |  | 167,048 | ​ |  | 178,271 | ​ |  | 26 | ​ |  | 2,883 | ​ |  | 2,909
Paycheck Protection Program - 1st Draw | ​ |  | 0 | ​ |  | 5 | ​ |  | 5 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0
Paycheck Protection Program - 2nd Draw | ​ | ​ | 0 | ​ | ​ | 163 | ​ | ​ | 163 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0
Political subdivisions | ​ |  | 0 | ​ |  | 90,719 | ​ |  | 90,719 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0
Commercial construction and land | ​ |  | 244 | ​ |  | 73,719 | ​ |  | 73,963 | ​ |  | 0 | ​ |  | 647 | ​ |  | 647
Loans secured by farmland | ​ |  | 76 | ​ |  | 12,874 | ​ |  | 12,950 | ​ |  | 0 | ​ |  | 112 | ​ |  | 112
Multi-family (5 or more) residential | ​ |  | 0 | ​ |  | 55,886 | ​ |  | 55,886 | ​ |  | 0 | ​ |  | 411 | ​ |  | 411
Agricultural loans | ​ |  | 57 | ​ |  | 2,378 | ​ |  | 2,435 | ​ |  | 0 | ​ |  | 21 | ​ |  | 21
Other commercial loans | ​ |  | 0 | ​ |  | 14,857 | ​ |  | 14,857 | ​ |  | 0 | ​ |  | 124 | ​ |  | 124
Total commercial | ​ |  | 18,754 | ​ |  | 1,092,744 | ​ |  | 1,111,498 | ​ |  | 453 | ​ |  | 10,845 | ​ |  | 11,298
Residential mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 506 | ​ | ​ | 509,276 | ​ | ​ | 509,782 | ​ | ​ | 0 | ​ | ​ | 3,413 | ​ | ​ | 3,413
Residential mortgage loans - junior liens | ​ |  | 30 | ​ |  | 24,919 | ​ |  | 24,949 | ​ |  | 0 | ​ |  | 167 | ​ |  | 167
Home equity lines of credit | ​ |  | 68 | ​ |  | 43,730 | ​ |  | 43,798 | ​ |  | 0 | ​ |  | 282 | ​ |  | 282
1-4 Family residential construction | ​ |  | 0 | ​ |  | 30,577 | ​ |  | 30,577 | ​ |  | 0 | ​ |  | 211 | ​ |  | 211
Total residential mortgage | ​ |  | 604 | ​ |  | 608,502 | ​ |  | 609,106 | ​ |  | 0 | ​ |  | 4,073 | ​ |  | 4,073
Consumer | ​ |  | 0 | ​ |  | 19,436 | ​ |  | 19,436 | ​ |  | 0 | ​ |  | 244 | ​ |  | 244
Unallocated | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | 1,000
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
Total | ​ | $ | 19,358 | ​ | $ | 1,720,682 | ​ | $ | 1,740,040 | ​ | $ | 453 | ​ | $ | 15,162 | ​ | $ | 16,615
​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
December 31, 2021 |  | Loans: | ​ | Allowance for Loan Losses:
(In Thousands) | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
​ | ​ | Individually | ​ | Collectively | ​ | ​ | ​ | ​ | Individually | ​ | Collectively | ​ |  | ​
​ |  | Evaluated |  | Evaluated |  | Totals |  | Evaluated |  | Evaluated |  | Totals
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial loans secured by real estate | ​ | $ | 10,926 | ​ | $ | 558,914 | ​ | $ | 569,840 | ​ | $ | 669 | ​ | $ | 3,736 | ​ | $ | 4,405
Commercial and industrial | ​ |  | 2,503 | ​ |  | 156,570 | ​ |  | 159,073 | ​ |  | 71 | ​ |  | 2,652 | ​ |  | 2,723
Paycheck Protection Program - 1st Draw | ​ |  | 0 | ​ |  | 1,356 | ​ |  | 1,356 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0
Paycheck Protection Program - 2nd Draw | ​ | ​ | 0 | ​ | ​ | 25,508 | ​ | ​ | 25,508 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0
Political subdivisions | ​ |  | 0 | ​ |  | 81,301 | ​ |  | 81,301 | ​ |  | 0 | ​ |  | 0 | ​ |  | 0
Commercial construction and land | ​ |  | 0 | ​ |  | 60,579 | ​ |  | 60,579 | ​ |  | 0 | ​ |  | 637 | ​ |  | 637
Loans secured by farmland | ​ |  | 83 | ​ |  | 11,038 | ​ |  | 11,121 | ​ |  | 0 | ​ |  | 115 | ​ |  | 115
Multi-family (5 or more) residential | ​ |  | 1,578 | ​ |  | 48,511 | ​ |  | 50,089 | ​ |  | 0 | ​ |  | 215 | ​ |  | 215
Agricultural loans | ​ |  | 0 | ​ |  | 2,351 | ​ |  | 2,351 | ​ |  | 0 | ​ |  | 25 | ​ |  | 25
Other commercial loans | ​ |  | 0 | ​ |  | 17,153 | ​ |  | 17,153 | ​ |  | 0 | ​ |  | 173 | ​ |  | 173
Total commercial | ​ |  | 15,090 | ​ |  | 963,281 | ​ |  | 978,371 | ​ |  | 740 | ​ |  | 7,553 | ​ |  | 8,293
Residential mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 630 | ​ | ​ | 482,999 | ​ | ​ | 483,629 | ​ | ​ | 0 | ​ | ​ | 3,650 | ​ | ​ | 3,650
Residential mortgage loans - junior liens | ​ |  | 14 | ​ |  | 23,300 | ​ |  | 23,314 | ​ |  | 0 | ​ |  | 184 | ​ |  | 184
Home equity lines of credit | ​ |  | 0 | ​ |  | 39,252 | ​ |  | 39,252 | ​ |  | 0 | ​ |  | 302 | ​ |  | 302
1-4 Family residential construction | ​ |  | 0 | ​ |  | 23,151 | ​ |  | 23,151 | ​ |  | 0 | ​ |  | 202 | ​ |  | 202
Total residential mortgage | ​ |  | 644 | ​ |  | 568,702 | ​ |  | 569,346 | ​ |  | 0 | ​ |  | 4,338 | ​ |  | 4,338
Consumer | ​ |  | 0 | ​ |  | 17,132 | ​ |  | 17,132 | ​ |  | 0 | ​ |  | 235 | ​ |  | 235
Unallocated | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | 671
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
Total | ​ | $ | 15,734 | ​ | $ | 1,549,115 | ​ | $ | 1,564,849 | ​ | $ | 740 | ​ | $ | 12,126 | ​ | $ | 13,537
​ Summary information related to impaired loans as of December 31, 2022 and 2021 is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | December 31, 2022 | ​ | December 31, 2021
​ | ​ | Unpaid | ​ | ​ | ​ | ​ | ​ | ​ | ​ | Unpaid | ​ | ​ | ​ | ​ | ​ | ​
​ | ​ | Principal | ​ | Recorded | ​ | Related | ​ | Principal | ​ | Recorded | ​ | Related
​ |  | Balance |  | Investment |  | Allowance |  | Balance |  | Investment |  | Allowance
With no related allowance recorded: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Commercial loans secured by real estate | ​ | $ | 8,563 | ​ | $ | 3,754 | ​ | $ | 0 | ​ | $ | 6,600 | ​ | $ | 4,458 | ​ | $ | 0
Commercial and industrial | ​ |  | 12,926 | ​ |  | 11,163 | ​ |  | 0 | ​ |  | 5,213 | ​ |  | 2,431 | ​ |  | 0
Residential mortgage loans - first liens | ​ | ​ | 506 | ​ | ​ | 506 | ​ | ​ | 0 | ​ | ​ | 656 | ​ | ​ | 630 | ​ | ​ | 0
Residential mortgage loans - junior liens | ​ |  | 68 | ​ |  | 30 | ​ |  | 0 | ​ |  | 124 | ​ |  | 14 | ​ |  | 0
Home equity lines of credit | ​ |  | 68 | ​ |  | 68 | ​ |  | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ |  | 0
Loans secured by farmland | ​ |  | 76 | ​ |  | 76 | ​ |  | 0 | ​ |  | 83 | ​ |  | 83 | ​ |  | 0
Agricultural loans | ​ | ​ | 57 | ​ | ​ | 57 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0
Construction and other land loans | ​ | ​ | 244 | ​ | ​ | 244 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0
Multi-family (5 or more) residential | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 2,734 | ​ | ​ | 1,578 | ​ | ​ | 0
Total with no related allowance recorded | ​ |  | 22,508 | ​ |  | 15,898 | ​ |  | 0 | ​ |  | 15,410 | ​ |  | 9,194 | ​ |  | 0
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
With a related allowance recorded: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial loans secured by real estate | ​ | ​ | 3,400 | ​ | ​ | 3,400 | ​ | ​ | 427 | ​ | ​ | 6,468 | ​ | ​ | 6,468 | ​ | ​ | 668
Commercial and industrial | ​ |  | 60 | ​ |  | 60 | ​ |  | 26 | ​ |  | 72 | ​ |  | 72 | ​ |  | 72
Total with a related allowance recorded | ​ |  | 3,460 | ​ |  | 3,460 | ​ |  | 453 | ​ |  | 6,540 | ​ |  | 6,540 | ​ |  | 740
Total | ​ | $ | 25,968 | ​ | $ | 19,358 | ​ | $ | 453 | ​ | $ | 21,950 | ​ | $ | 15,734 | ​ | $ | 740
​ ​ The average balance of impaired loans and interest income recognized on impaired loans is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | ​ | ​ | Interest Income Recognized on
​ | ​ | Average Investment in | ​ | on Impaired Loans
​ | ​ | Impaired Loans | ​ | on a Cash Basis
​ | ​ | Year Ended December 31, | ​ | Year Ended December 31,
​ | ​ | 2022 | ​ | 2021 | ​ | 2020 |  | 2022 | ​ | 2021 |  | 2020
Commercial: | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​
Commercial loans secured by real estate | ​ | $ | 9,757 | ​ | $ | 11,617 | ​ | $ | 5,266 | ​ | $ | 657 | ​ | $ | 557 | ​ | $ | 258
Commercial and industrial | ​ | ​ | 2,078 | ​ | ​ | 2,636 | ​ | ​ | 2,542 | ​ |  | 210 | ​ |  | 34 | ​ |  | 34
Commercial construction and land | ​ | ​ | 72 | ​ | ​ | 48 | ​ | ​ | 521 | ​ |  | 3 | ​ |  | 3 | ​ |  | 15
Loans secured by farmland | ​ | ​ | 80 | ​ | ​ | 84 | ​ | ​ | 319 | ​ |  | 0 | ​ |  | 1 | ​ |  | 27
Multi-family (5 or more) residential | ​ | ​ | 197 | ​ | ​ | 1,583 | ​ | ​ | 202 | ​ | ​ | 1,156 | ​ | ​ | 133 | ​ | ​ | 0
Agricultural loans | ​ | ​ | 60 | ​ | ​ | 67 | ​ | ​ | 76 | ​ |  | 4 | ​ |  | 4 | ​ |  | 4
Other commercial loans | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 18 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 1
Total commercial | ​ | ​ | 12,244 | ​ | ​ | 16,035 | ​ | ​ | 8,944 | ​ |  | 2,030 | ​ |  | 732 | ​ |  | 339
Residential mortgage: | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ |  | ​ |  | ​ | ​ |  |  | ​ |
Residential mortgage loans - first lien | ​ | ​ | 575 | ​ | ​ | 1,647 | ​ | ​ | 1,853 | ​ | ​ | 24 | ​ | ​ | 78 | ​ | ​ | 116
Residential mortgage loans - junior lien | ​ | ​ | 33 | ​ | ​ | 361 | ​ | ​ | 392 | ​ |  | 7 | ​ |  | 11 | ​ |  | 22
Home equity lines of credit | ​ | ​ | 43 | ​ | ​ | 0 | ​ | ​ | 57 | ​ |  | 4 | ​ |  | 0 | ​ |  | 3
Total residential mortgage | ​ | ​ | 651 | ​ | ​ | 2,008 | ​ | ​ | 2,302 | ​ |  | 35 | ​ |  | 89 | ​ |  | 141
Total | ​ | $ | 12,895 | ​ | $ | 18,043 | ​ | $ | 11,246 | ​ | $ | 2,065 | ​ | $ | 821 | ​ | $ | 480
​ The increase in interest income recognized on a cash basis on impaired loans in 2022 resulted mainly from repayments received on loans that had been classified as purchased credit impaired at December 31, 2021. ​ The breakdown by portfolio segment and class of nonaccrual loans and loans past due ninety days or more and still accruing is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | December 31, 2022 | ​ | December 31, 2021
​ | ​ | Past Due | ​ | ​ | ​ | ​ | Past Due | ​ | ​ | ​
​ | ​ | 90+ Days and | ​ | ​ | ​ | ​ | 90+ Days and | ​ | ​ | ​
​ |  | Accruing |  | Nonaccrual |  | Accruing |  | Nonaccrual
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  |  | ​ |  |
Commercial loans secured by real estate | ​ | $ | 612 | ​ | $ | 7,153 | ​ | $ | 738 | ​ | $ | 10,885
Commercial and industrial | ​ |  | 80 | ​ |  | 11,165 | ​ |  | 30 | ​ |  | 2,299
Commercial construction and land | ​ |  | 0 | ​ |  | 244 | ​ |  | 0 | ​ |  | 48
Loans secured by farmland | ​ |  | 0 | ​ |  | 76 | ​ |  | 28 | ​ |  | 83
Multi-family (5 or more) residential | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 1,578
Agricultural loans | ​ | ​ | 57 | ​ | ​ | 0 | ​ | ​ | 65 | ​ | ​ | 0
Total commercial | ​ |  | 749 | ​ |  | 18,638 | ​ |  | 861 | ​ |  | 14,893
Residential mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 1,288 | ​ | ​ | 4,259 | ​ | ​ | 1,144 | ​ | ​ | 4,005
Residential mortgage loans - junior liens | ​ |  | 54 | ​ |  | 0 | ​ |  | 69 | ​ |  | 3
Home equity lines of credit | ​ |  | 102 | ​ |  | 129 | ​ |  | 102 | ​ |  | 82
Total residential mortgage | ​ |  | 1,444 | ​ |  | 4,388 | ​ |  | 1,315 | ​ |  | 4,090
Consumer | ​ |  | 44 | ​ |  | 59 | ​ |  | 43 | ​ |  | 16
Totals | ​ | $ | 2,237 | ​ | $ | 23,085 | ​ | $ | 2,219 | ​ | $ | 18,999
​ The amounts shown in the table immediately above include loans classified as troubled debt restructurings (described in more detail below), if such loans are past due ninety days or more or nonaccrual. PCI loans with a total recorded investment of $1,027,000 at December 31, 2022 and $6,558,000 at December 31, 2021 are classified as nonaccrual. The table below presents a summary of the contractual aging of loans as of December 31, 2022 and 2021. ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | As of December 31, 2022 | ​ | As of December 31, 2021
​ |  | Current & |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | Current & |  | ​ | ​ |  | ​ | ​ |  | ​ | ​
​ | ​ | Past Due | ​ | Past Due | ​ | Past Due | ​ | ​ | ​ | ​ | Past Due | ​ | Past Due | ​ | Past Due | ​ | ​ | ​
​ | ​ | Less than | ​ | 30-89 | ​ | 90+ | ​ | ​ | ​ | ​ | Less than | ​ | 30-89 | ​ | 90+ | ​ | ​ | ​
​ | ​ | 30 Days | ​ | Days | ​ | Days | ​ | Total | ​ | 30 Days | ​ | Days | ​ | Days | ​ | Total
Commercial: | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  | ​ | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |
Commercial loans secured by real estate | ​ | $ | 676,779 | ​ | $ | 1,105 | ​ | $ | 4,365 | ​ | $ | 682,249 | ​ | $ | 563,658 | ​ | $ | 762 | ​ | $ | 5,420 | ​ | $ | 569,840
Commercial and industrial | ​ |  | 177,747 | ​ |  | 319 | ​ |  | 205 | ​ |  | 178,271 | ​ |  | 158,188 | ​ |  | 72 | ​ |  | 813 | ​ |  | 159,073
Paycheck Protection Program - 1st Draw | ​ | ​ | 5 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 5 | ​ | ​ | 1,339 | ​ | ​ | 17 | ​ | ​ | 0 | ​ | ​ | 1,356
Paycheck Protection Program - 2nd Draw | ​ | ​ | 163 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 163 | ​ | ​ | 25,508 | ​ | ​ | 0 | ​ | ​ | 0 | ​ | ​ | 25,508
Political subdivisions | ​ |  | 90,719 | ​ |  | 0 | ​ |  | 0 | ​ |  | 90,719 | ​ |  | 81,301 | ​ |  | 0 | ​ |  | 0 | ​ |  | 81,301
Commercial construction and land | ​ |  | 73,766 | ​ |  | 0 | ​ |  | 197 | ​ |  | 73,963 | ​ |  | 60,509 | ​ |  | 70 | ​ |  | 0 | ​ |  | 60,579
Loans secured by farmland | ​ |  | 12,856 | ​ |  | 18 | ​ |  | 76 | ​ |  | 12,950 | ​ |  | 11,010 | ​ |  | 0 | ​ |  | 111 | ​ |  | 11,121
Multi-family (5 or more) residential | ​ |  | 55,886 | ​ |  | 0 | ​ |  | 0 | ​ |  | 55,886 | ​ |  | 48,532 | ​ |  | 0 | ​ |  | 1,557 | ​ |  | 50,089
Agricultural loans | ​ |  | 2,378 | ​ |  | 0 | ​ |  | 57 | ​ |  | 2,435 | ​ |  | 2,279 | ​ |  | 7 | ​ |  | 65 | ​ |  | 2,351
Other commercial loans | ​ |  | 14,857 | ​ |  | 0 | ​ |  | 0 | ​ |  | 14,857 | ​ |  | 17,153 | ​ |  | 0 | ​ |  | 0 | ​ |  | 17,153
Total commercial | ​ |  | 1,105,156 | ​ |  | 1,442 | ​ |  | 4,900 | ​ |  | 1,111,498 | ​ |  | 969,477 | ​ |  | 928 | ​ |  | 7,966 | ​ |  | 978,371
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
Residential mortgage: |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |  |  | ​ |
Residential mortgage loans - first liens | ​ | ​ | 500,778 | ​ | ​ | 5,323 | ​ | ​ | 3,681 | ​ | ​ | 509,782 | ​ | ​ | 475,637 | ​ | ​ | 5,038 | ​ | ​ | 2,954 | ​ | ​ | 483,629
Residential mortgage loans - junior liens | ​ |  | 24,702 | ​ |  | 193 | ​ |  | 54 | ​ |  | 24,949 | ​ |  | 23,229 | ​ |  | 16 | ​ |  | 69 | ​ |  | 23,314
Home equity lines of credit | ​ |  | 42,952 | ​ |  | 652 | ​ |  | 194 | ​ |  | 43,798 | ​ |  | 38,830 | ​ |  | 279 | ​ |  | 143 | ​ |  | 39,252
1-4 Family residential construction | ​ |  | 30,577 | ​ |  | 0 | ​ |  | 0 | ​ |  | 30,577 | ​ |  | 23,151 | ​ |  | 0 | ​ |  | 0 | ​ |  | 23,151
Total residential mortgage | ​ |  | 599,009 | ​ |  | 6,168 | ​ |  | 3,929 | ​ |  | 609,106 | ​ |  | 560,847 | ​ |  | 5,333 | ​ |  | 3,166 | ​ |  | 569,346
Consumer | ​ |  | 19,169 | ​ |  | 164 | ​ |  | 103 | ​ |  | 19,436 | ​ |  | 17,001 | ​ |  | 72 | ​ |  | 59 | ​ |  | 17,132
Totals | ​ | $ | 1,723,334 | ​ | $ | 7,774 | ​ | $ | 8,932 | ​ | $ | 1,740,040 | ​ | $ | 1,547,325 | ​ | $ | 6,333 | ​ | $ | 11,191 | ​ | $ | 1,564,849
​ Nonaccrual loans are included in the contractual aging immediately above. A summary of the contractual aging of nonaccrual loans at December 31, 2022 and 2021 is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | Current & | ​ | ​ | ​ | ​ | ​ | ​ | ​ |  | ​
​ | ​ | Past Due | ​ | Past Due | ​ | Past Due | ​ |  | ​
​ | ​ | Less than | ​ | 30-89 | ​ | 90+ | ​ |  | ​
​ |  | 30 Days |  | Days |  | Days |  | Total
December 31, 2022 Nonaccrual Totals | ​ | $ | 15,695 | ​ | $ | 695 | ​ | $ | 6,695 | ​ | $ | 23,085
December 31, 2021 Nonaccrual Totals | ​ | $ | 8,800 | ​ | $ | 1,227 | ​ | $ | 8,972 | ​ | $ | 18,999
​ Loans whose terms are modified are classified as TDRs if the Corporation grants such borrowers concessions and it is deemed that those borrowers are experiencing financial difficulty. Loans classified as TDRs are designated as impaired. The outstanding balance of loans subject to TDRs, as well as the contractual aging information at December 31, 2022 and 2021 is as follows: ​ Troubled Debt Restructurings (TDRs): ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | Current & | ​ | ​ | ​ | ​ | ​ | ​ | ​ |  | ​ | ​ |  | ​
​ | ​ | Past Due | ​ | Past Due | ​ | Past Due | ​ |  | ​ | ​ |  | ​
​ | ​ | Less than | ​ | 30-89 | ​ | 90+ | ​ |  | ​ | ​ |  | ​
​ |  | 30 Days |  | Days |  | Days |  | Nonaccrual |  | Total
December 31, 2022 Totals | ​ | $ | 503 | ​ | $ | 68 | ​ | $ | 57 | ​ | $ | 3,799 | ​ | $ | 4,427
December 31, 2021 Totals | ​ | $ | 248 | ​ | $ | 40 | ​ | $ | 65 | ​ | $ | 5,452 | ​ | $ | 5,805
​ At December 31, 2022 and 2021, there were no commitments to loan additional funds to borrowers whose loans have been classified as TDRs. A summary of TDRs that occurred during 2022, 2021 and 2020 is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
(Balances in Thousands) | ​ | 2022 |  | 2021 | ​ | 2020
​ |  | ​ |  | Post- |  | ​ |  | Post- | ​ | ​ |  | Post-
​ | ​ | Number | ​ | Modification |  | Number | ​ | Modification | ​ | Number | ​ | Modification
​ | ​ | of | ​ | Recorded |  | of | ​ | Recorded | ​ | of | ​ | Recorded
​ | ​ | Loans | ​ | Investment |  | Loans | ​ | Investment | ​ | Loans | ​ | Investment
Residential mortgage - first liens: |  |  |  | ​ |  | ​ |  |  | ​ |  | ​ |  |  | ​ |
Reduced monthly payments and extended maturity date |  | 0 | ​ | $ | 0 | ​ | 1 | ​ | $ | 12 | ​ | 0 | ​ | $ | 0
Reduced monthly payments for a fifteen-month period | ​ | 0 | ​ | ​ | 0 | ​ | 1 | ​ | ​ | 116 | ​ | 0 | ​ | ​ | 0
Residential mortgage - junior liens: |  |  | ​ | ​ |  | ​ |  | ​ | ​ |  | ​ |  | ​ | ​ |
Reduced monthly payments and extended maturity date |  | 1 | ​ | ​ | 48 | ​ | 0 | ​ | ​ | 0 | ​ | 0 | ​ | ​ | 0
New loan at lower than risk-adjusted market rate to borrower from whom short sale of other collateral was accepted |  | 0 | ​ |  | 0 | ​ | 0 | ​ |  | 0 | ​ | 1 | ​ |  | 30
Home equity lines of credit: | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
Reduced monthly payments and extended maturity date | ​ | 0 | ​ | ​ | 0 | ​ | 1 | ​ | ​ | 24 | ​ | 0 | ​ | ​ | 0
Reduced monthly payments for an eighteen-month period | ​ | 0 | ​ | ​ | 0 | ​ | 1 | ​ | ​ | 70 | ​ | 0 | ​ | ​ | 0
Commercial loans secured by real estate: | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
Interest only payments for a nine-month period | ​ | 0 | ​ | ​ | 0 | ​ | 0 | ​ | ​ | 0 | ​ | 1 | ​ | ​ | 240
Principal and interest payment deferral non-COVID related | ​ | 0 | ​ | ​ | 0 | ​ | 0 | ​ | ​ | 0 | ​ | 2 | ​ | ​ | 4,831
Multi-family (5 or more) residential, | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
Principal and interest payment deferral non-COVID related | ​ | 0 | ​ | ​ | 0 | ​ | 0 | ​ | ​ | 0 | ​ | 3 | ​ | ​ | 2,170
Loans secured by farmland, |  |  | ​ |  |  | ​ |  | ​ |  |  | ​ |  | ​ |  |
Deferral of principal and interest payments for 12 months with a balloon payment at maturity |  | 1 | ​ |  | 268 | ​ | 0 | ​ |  | 0 | ​ | 0 | ​ |  | 0
Total |  | 2 | ​ | $ | 316 | ​ | 4 | ​ | $ | 222 | ​ | 7 | ​ | $ | 7,271
​ In the year ended December 31, 2020, the Corporation recorded a specific allowance for loan losses of $416,000 related to a loan secured by commercial real estate for which a TDR concession was made in 2020 and included in the table above. In 2021, the allowance on this loan with a recorded investment of $3,405,000 at December 31, 2021 was increased to $427,000. At December 31, 2022 the allowance on this loan with a recorded investment of $3,400,000 remained $427,000. The other loans for which TDRs were granted in 2022, 2021 and 2020 had no specific impact on the provision or allowance for loan losses. In 2022, 2021 and 2020, payment defaults on loans for which modifications considered to be TDRs were entered into within the previous 12 months are summarized as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​ | ​
​ | ​ | 2022 | ​ | 2021 |  | 2020
​ | ​ | Number | ​ | ​ | ​ | ​ | Number | ​ | ​ | ​ | ​ | Number | ​ | ​ | ​
​ | ​ | of | ​ | Recorded | ​ | of | ​ | Recorded | ​ | of | ​ | Recorded
(Balances in Thousands) |  | Loans |  | Investment | ​ | Loans |  | Investment |  | Loans |  | Investment
Commercial loans secured by real estate |  | 0 | ​ | $ | 0 | ​ | 1 | ​ | $ | 3,405 |  | 1 | ​ | $ | 240
Total |  | 0 | ​ | $ | 0 | ​ | 1 | ​ | $ | 3,405 |  | 1 | ​ | $ | 240
​ The default that occurred in 2021 was on the loan referred to above with a specific allowance of $427,000 at December 31, 2022. The loan for which a default occurred in 2020 was repaid in full in 2021. The carrying amount of foreclosed residential real estate properties held as a result of obtaining physical possession (included in Foreclosed assets held for sale in the consolidated balance sheets) is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | December 31, |  | December 31,
​ | ​ | 2022 | ​ | 2021
Foreclosed residential real estate | ​ | $ | 0 | ​ | $ | 256
​ The recorded investment of consumer mortgage loans secured by residential real properties for which formal foreclosure proceedings were in process is as follows: ​
​ | ​ | ​ | ​ | ​ | ​ | ​
(In Thousands) | ​ | December 31, |  | December 31,
​ | ​ | 2022 | ​ | 2021
Residential real estate in process of foreclosure | ​ | $ | 1,229 | ​ | $ | 1,260
​

X
- Definition The entire disclosure for claims held for amounts due a entity, excluding financing receivables. Examples include, but are not limited to, trade accounts receivables, notes receivables, loans receivables. Includes disclosure for allowance for credit losses. + References Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 310 -SubTopic 10 -URI https://asc.fasb.org/subtopic&trid=2196772 + Details
Name: | us-gaap_LoansNotesTradeAndOtherReceivablesDisclosureTextBlock
Namespace Prefix: | us-gaap_
Data Type: | dtr-types:textBlockItemType
Balance Type: | na
Period Type: | duration

X
- References No definition available. + Details
Name: | us-gaap_ReceivablesAbstract
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration