6. Goodwill
The changes in the carrying amount of goodwill as of December 31, 2016 and 2015 consisted of the following (in thousands):
| | | Year Ended December 31, 2016 | | | Year Ended December 31, 2015 | | | | | | | | (as restated) | | Beginning balance, as restated | | $ | 195,373 | | | $ | 171,740 | | Goodwill acquired during the period | | | 31,419 | | | | 23,437 | | Goodwill adjustments for purchase price allocation of business acquired | | | 14 | | | | 376 | | Goodwill written-off - closed clinics | | | - | | | | (180 | ) | Ending balance | | $ | 226,806 | | | $ | 195,373 | |
|