37 An asset’ s or liability’ s level within the fair value hierarchy is based on the lowest level of input that is significant to the fair value measurement.  For financial assets and liabilities measured at fair value on a recurring basis, the fair value measurements by level within the fair value hierarchy used are as follows ( in thousands):  For financial assets measured at fair value on a nonrecurring basis, the fair value measurements by level within the fair value hierarchy used are as follows ( in thousands):  246 December 31, 2013 Level 1 Level 2 Level 3 Total U. S. agency securities $ - $  1, 341 1, 341 State and municipal securities -  11, 421 11, 421 Mortgage- backed securities -  20, 889 20, 889 Collateralized mortgage 9, 028 obligations -  5, 552 5, 552 Loans held - for -sale -  6, 669 6, 669 Asset derivatives -  381 381 46, 253 46, 253 Liability derivatives $ - $  1 $ - $  1 December 31, 2012 Level 1 Level 2 Level 3 Total U. S. treasury securities 246 246 U. S. agency securities 1, 412 1, 412 State and municipal securities 9, 028 9, 028 Mortgage- backed securities 17, 051 17, 051 Collateralized mortgage obligations 8, 491 8, 491 Loans held - for -sale 6, 005 6, 005 Asset derivatives 352 352 42, 585 42, 585 Liability derivatives 35 35 December 31, 2013 Level 1 Level 2 Level 3 Total Impaired loans 873 873 873 873 December 31, 2012 Level 1 Level 2 Level 3 Total Impaired loans 3, 132 3, 132 Foreclosed real estate 120 120 3, 252 $  3, 252