Loans and The Allowance for Loan Losses | LOANS AND THE ALLOWANCE FOR LOAN LOSSES A summary of the balances of loans follows: December 31, 2017 2016 (In thousands) Real estate: 1-4 family residential $ 922,627 $ 851,154 Home equity 80,662 78,719 Commercial real estate 834,264 687,289 Construction 91,050 76,351 1,928,603 1,693,513 Commercial business 253,509 206,234 Consumer 21,698 29,281 Total loans 2,203,810 1,929,028 Allowance for loan losses (20,877 ) (18,750 ) Discount and fair value adjustments on purchased loans (1,477 ) (1,846 ) Deferred loan costs and fees, net 4,691 4,439 Loans, net $ 2,186,147 $ 1,912,871 The Company has sold residential mortgage loans in the secondary mortgage market, some of which are sold with limited recourse. The Company has retained the servicing responsibility on a portion of the loans sold and receives fees for the services provided. The unpaid principal balances of mortgage loans serviced for others were $245.1 million and $89.7 million at December 31, 2017 and 2016 , respectively. The maximum contingent liability associated with loans sold with recourse is $7.6 million at December 31, 2017 . Neither mortgage loans serviced for others nor the contingent liability associated with sold loans is recorded on the consolidated balance sheets. There have been no contingency losses recognized on these loans to date. The Company has transferred a portion of its originated commercial real estate, commercial business and construction loans to participating lenders. The amounts transferred have been accounted for as sales and are therefore not included on the consolidated balance sheets. The Company and participating lenders share ratably in cash flows and any gains or losses that may result from a borrower’s lack of compliance with contractual terms of the loan. The Company continues to service the loans on behalf of the participating lenders and, as such, collects cash payments from the borrowers, remits payments (net of servicing fees) to participating lenders and disburses required escrow funds to relevant parties. At December 31, 2017 and 2016 , the Company was servicing loans for participants aggregating $88.8 million and $56.0 million , respectively. At December 31, 2017 and 2016 , 1-4 family residential loans in the amount of $816.9 million and $759.9 million , respectively, and commercial real estate loans in the amount of $266.3 million and $293.1 million , respectively, were pledged to secure borrowings. See Note 7. Activity in the allowance for loan losses for the years ended December 31, 2017 , 2016 and 2015 follows: 1-4 Family Home Commercial Construction Commercial Consumer Unallocated Total (In thousands) 2017 Beginning balance $ 4,846 $ 537 $ 8,374 $ 1,353 $ 3,206 $ 434 $ — $ 18,750 Provision for loan losses 83 162 1,283 355 193 22 — 2,098 Loans charged-off (52 ) — (73 ) — — (134 ) — (259 ) Recoveries 199 — — — 74 15 — 288 Ending balance $ 5,076 $ 699 $ 9,584 $ 1,708 $ 3,473 $ 337 $ — $ 20,877 2016 Beginning balance $ 3,916 $ 636 $ 7,147 $ 1,364 $ 2,839 $ 772 $ 428 $ 17,102 Provision (credit) for loan losses 830 (99 ) 1,447 (11 ) 3,428 (282 ) (428 ) 4,885 Loans charged-off — — (321 ) — (3,098 ) (56 ) — (3,475 ) Recoveries 100 — 101 — 37 — — 238 Ending balance $ 4,846 $ 537 $ 8,374 $ 1,353 $ 3,206 $ 434 $ — $ 18,750 2015 Beginning balance $ 3,222 $ 340 $ 3,551 $ 1,056 $ 3,410 $ 736 $ 658 $ 12,973 Provision (credit) for loan losses 612 296 3,596 308 (571 ) 79 (230 ) 4,090 Loans charged-off — — — — — (43 ) — (43 ) Recoveries 82 — — — — — — 82 Ending balance $ 3,916 $ 636 $ 7,147 $ 1,364 $ 2,839 $ 772 $ 428 $ 17,102 Additional information pertaining to the allocation of the allowance for loan losses to loan segments at December 31, 2017 and 2016 , follows: 1-4 Family Home Commercial Construction Commercial Consumer Unallocated Total (In thousands) December 31, 2017 Allowance related to impaired loans $ 80 $ — $ — $ — $ — $ 1 $ — $ 81 Allowance related to non-impaired loans 4,996 699 9,584 1,708 3,473 336 — 20,796 Total allowance for loan losses $ 5,076 $ 699 $ 9,584 $ 1,708 $ 3,473 $ 337 $ — $ 20,877 Impaired loans $ 5,949 $ 1,387 $ 4,744 $ — $ — $ 202 $ — $ 12,282 Non-impaired loans 916,678 79,275 829,520 91,050 253,509 21,496 — 2,191,528 Total loans $ 922,627 $ 80,662 $ 834,264 $ 91,050 $ 253,509 $ 21,698 $ — $ 2,203,810 December 31, 2016 Allowance related to impaired loans $ 17 $ — $ — $ — $ — $ — $ — $ 17 Allowance related to non-impaired loans 4,829 537 8,374 1,353 3,206 434 — 18,733 Total allowance for loan losses $ 4,846 $ 537 $ 8,374 $ 1,353 $ 3,206 $ 434 $ — $ 18,750 Impaired loans $ 6,726 $ 1,153 $ 941 $ — $ 241 $ 170 $ — $ 9,231 Non-impaired loans 844,428 77,566 686,348 76,351 205,993 29,111 — 1,919,797 Total loans $ 851,154 $ 78,719 $ 687,289 $ 76,351 $ 206,234 $ 29,281 $ — $ 1,929,028 The following is a summary of past due and non-accrual loans, by loan segment, at December 31, 2017 and 2016 : 30-59 Days Past Due 60-89 Days Past Due Past Due 90 Days or More Total Past Due Loans on Non-accrual (In thousands) December 31, 2017 Real estate: 1-4 family residential $ 381 $ 348 $ 2,184 $ 2,913 $ 5,190 Home equity 509 13 656 1,178 1,387 Commercial real estate — — 3,893 3,893 4,744 Consumer 107 7 92 206 202 Total $ 997 $ 368 $ 6,825 $ 8,190 $ 11,523 December 31, 2016 Real estate: 1-4 family residential $ 584 $ 373 $ 2,322 $ 3,279 $ 6,478 Home equity 452 496 775 1,723 1,153 Commercial real estate 1,393 — — 1,393 941 Commercial business 4,996 13 — 5,009 241 Consumer 175 5 7 187 170 Total $ 7,600 $ 887 $ 3,104 $ 11,591 $ 8,983 There were no loans past due 90 days or more and still accruing at December 31, 2017 and 2016 . The following is a summary of information pertaining to impaired loans by loan segment at the dates indicated: Recorded Investment Unpaid Principal Balance Related Allowance December 31, 2017 (In thousands) Impaired loans without a valuation allowance: Real estate: 1-4 family residential $ 4,501 $ 4,897 $ — Home equity 1,387 1,523 — Commercial real estate 4,744 5,206 — Commercial business — 11 — Consumer 191 243 — Total 10,823 11,880 — Impaired loans with a valuation allowance: Real estate: 1-4 family residential 1,448 1,448 80 Consumer 11 11 1 Total 1,459 1,459 81 Total impaired loans $ 12,282 $ 13,339 $ 81 December 31, 2016 Impaired loans without a valuation allowance: Real estate: 1-4 family residential $ 6,605 $ 7,023 $ — Home equity 1,153 1,225 — Commercial real estate 941 1,207 — Commercial business 241 3,279 — Consumer 170 183 — Total 9,110 12,917 — Impaired loans with a valuation allowance: 1-4 family residential 121 313 17 Total impaired loans $ 9,231 $ 13,230 $ 17 The following tables set forth information regarding average balances and interest income recognized (the majority of which is on a cash basis) on impaired loans, by segment, for the years ended December 31, 2017 , 2016 and 2015 : Average Recorded Investment Interest Income Recognized 2017 (In thousands) Real estate: 1-4 family residential $ 6,254 $ 281 Home equity 1,264 58 Commercial real estate 4,125 220 Commercial business 129 20 Consumer 241 9 Total $ 12,013 $ 588 2016 Real estate: 1-4 family residential $ 6,451 $ 449 Home equity 555 29 Commercial real estate 3,192 206 Commercial business 672 55 Consumer 160 12 Total $ 11,030 $ 751 2015 Real estate: 1-4 family residential $ 4,869 $ 270 Home equity 575 14 Commercial real estate 926 161 Commercial business 2 1 Consumer 78 6 Total $ 6,450 $ 452 No additional funds are committed to be advanced in connection with impaired loans. Troubled debt restructurings recorded during the year ended December 31, 2017 totaled $973,000 . There were no material troubled debt restructurings recorded during the years ended December 31, 2016 and 2015. Credit Quality Information The Company utilizes a ten-grade internal loan rating system for all loans as follows: Loans rated 1 - 6 are considered "acceptable" rated loans that are performing as agreed, and generally require only routine supervision. Loans rated 7 are considered “special mention.” These loans are starting to show signs of potential weakness and are being closely monitored by management. Loans rated 8 are considered “substandard.” Generally, a loan is considered substandard if it is inadequately protected by the current net worth and paying capacity of the obligors and/or the collateral pledged. There is a distinct possibility that the Company will sustain some loss if the weakness is not corrected. Generally, all loans 90 days delinquent are rated 8. Loans rated 9 are considered “doubtful.” Serious problems exist to the point where a partial loss of principal is likely. Weakness is so pronounced that on the basis of current information, conditions and values, collection in full is highly improbable. Loans rated 10 are considered "loss" and the credit extended to the customer is considered uncollectible or of such little value that it does not warrant consideration as an active asset. The Company assigns a 6 risk-rating to otherwise performing, satisfactorily collateralized consumer and residential loans where the Company becomes aware of deterioration in a FICO score or other indication of potential inability to service the debt. The Company assigns risk ratings of 7-10 to residential or consumer loans that have a well-defined weakness that may jeopardize the collection of the contractual principal and interest, are contractually past due 90 days or more or legal action has commenced against the borrower. All other residential mortgage and consumer loans have no risk rating. On an annual basis, or more often if needed, the Company formally reviews the ratings on all commercial and construction loans. At least annually, the Company engages an independent third party to review a significant portion of loans within these segments. Management uses the results of these reviews as part of its annual review process. Management primarily utilizes delinquency reports, the watch list and other loan reports to monitor credit quality of other loan segments. The following tables present the Company’s loans by risk rating at December 31, 2017 and 2016 : 1-4 Family Residential Home Equity Commercial Real Estate Construction Commercial Business Consumer Total Loans (In thousands) December 31, 2017 Loans rated 1 - 6 $ 1,022 $ 270 $ 821,815 $ 91,050 $ 252,765 $ 3 $ 1,166,925 Loans rated 7 2,848 1,523 4,660 — 744 121 9,896 Loans rated 8 2,566 — 7,789 — — — 10,355 Loans rated 9 250 — — — — — 250 Loans rated 10 — — — — — — — Loans not rated 915,941 78,869 — — — 21,574 1,016,384 $ 922,627 $ 80,662 $ 834,264 $ 91,050 $ 253,509 $ 21,698 $ 2,203,810 December 31, 2016 Loans rated 1 - 6 $ 1,054 $ 293 $ 671,872 $ 76,351 $ 188,706 $ 4 $ 938,280 Loans rated 7 3,514 967 9,720 — 17,510 146 31,857 Loans rated 8 2,442 258 5,697 — 18 37 8,452 Loans rated 9 645 — — — — — 645 Loans rated 10 — — — — — — — Loans not rated 843,499 77,201 — — — 29,094 949,794 $ 851,154 $ 78,719 $ 687,289 $ 76,351 $ 206,234 $ 29,281 $ 1,929,028 |