CONSOLIDATED STATEMENTS OF CASH FLOWS
Year Ended December 31, | |||||||||||
(in thousands) | 2021 | 2020 | 2019 | ||||||||
Cash flows from operating activities: | |||||||||||
Net income (loss) | $ | 322,052 | $ | (149,594 | ) | $ | (69,632 | ) | |||
Adjustments to reconcile net income (loss) to net cash provided by (used in) operating activities: | |||||||||||
Depreciation and amortization | 34,623 | 44,595 | 50,396 | ||||||||
Stock-based compensation | 55,153 | 17,725 | 23,587 | ||||||||
Provision for inventory obsolescence and revaluation | (2,909 | ) | 12,373 | — | |||||||
Loss on hedge accounting de-designation and termination | 721 | 1,235 | — | ||||||||
Provision for bad debts | 232 | 457 | 1,308 | ||||||||
(Gain) Loss on the disposition of businesses, property, equipment and other assets | (350,846 | ) | 5,274 | 2,282 | |||||||
Provision for deferred income taxes and reserve adjustments | (11,679 | ) | (1,206 | ) | (3,354 | ) | |||||
Impairment of goodwill and assets | 1,676 | 55,484 | 1,728 | ||||||||
Changes in operating accounts: | |||||||||||
Accounts receivable | (11,912 | ) | (6,052 | ) | 15,071 | ||||||
Inventories | 7,866 | (9,901 | ) | 18,447 | |||||||
Prepaid expenses and other current assets | (8,106 | ) | (16,218 | ) | 9,150 | ||||||
Accounts payable | 27,159 | (6,653 | ) | (16,846 | ) | ||||||
Deferred revenue and customer deposits | (3,325 | ) | 3,231 | 677 | |||||||
Accrued and other liabilities | (12,389 | ) | 28,286 | (1,346 | ) | ||||||
All other operating activities | (169 | ) | 843 | 113 | |||||||
Net cash provided by (used in) operating activities | 48,147 | (20,121 | ) | 31,581 | |||||||
Cash flows from investing activities: | |||||||||||
Purchases of property and equipment | (18,791 | ) | (13,643 | ) | (23,985 | ) | |||||
Proceeds from sale of assets and businesses, net of cash | 421,485 | 1,554 | 1,620 | ||||||||
Business acquisitions, net of cash acquired | (139,685 | ) | — | — | |||||||
Other investing activities | (2,454 | ) | 356 | (2,007 | ) | ||||||
Net cash provided by (used in) investing activities | 260,555 | (11,733 | ) | (24,372 | ) | ||||||
Cash flows from financing activities: | |||||||||||
Proceeds from revolving credit facilities | — | 20,000 | — | ||||||||
Payments on revolving credit facilities | — | (20,000 | ) | — | |||||||
Proceeds from borrowings, net | 460,000 | — | 100,000 | ||||||||
Debt issuance costs | (13,466 | ) | — | — | |||||||
Repayment of borrowings/long-term debt | (21,392 | ) | (26,840 | ) | (76,768 | ) | |||||
Proceeds from issuance of common stock | — | 24,702 | — | ||||||||
Purchase of noncontrolling interest | (6,300 | ) | (12,500 | ) | (2,500 | ) | |||||
Payments related to net-share settlement of stock-based compensation | (12,619 | ) | (5,138 | ) | (3,194 | ) | |||||
Other financing activities | (423 | ) | 296 | (1,338 | ) | ||||||
Net cash provided by (used in) financing activities | 405,800 | (19,480 | ) | 16,200 | |||||||
Effect of exchange rate changes on cash, cash equivalents and restricted cash | (9,243 | ) | 1,428 | 289 | |||||||
Net increase (decrease) in cash, cash equivalents and restricted cash | 705,259 | (49,906 | ) | 23,698 | |||||||
Cash, cash equivalents and restricted cash at the beginning of the period a | 84,711 | 134,617 | 110,919 | ||||||||
Cash, cash equivalents and restricted cash at the end of the period a | $ | 789,970 | $ | 84,711 | $ | 134,617 |