Consolidated Statements of Cash Flows (Unaudited) - USD ($)
$ in Thousands
3 Months Ended
Mar. 31, 2020
Mar. 31, 2019
Operating activities    
Net (loss) income $ (2,933) $ 3,497
Adjustments to reconcile net (loss) income to net cash provided by operating activities:    
Deferred income taxes 1,038 2,176
Noncash stock compensation expense 4,608 2,806
Noncash interest expense 1,491 1,994
Change in contingent consideration due to seller 30 290
Depreciation and amortization 9,792 9,468
Change in assets:    
Accounts receivable (48,384) 2,509
Income taxes (payable) receivable (425) 3,366
Prepaid expenses and other assets 885 2,441
Change in liabilities:    
Accounts payable 49,417 2,865
Accrued expenses and other liabilities (5,852) (6,237)
Payments of contingent consideration in excess of costs over estimated earnings 0 (1,097)
Net cash provided by operating activities 9,668 24,076
Investing activities    
Purchases of property and equipment (5,101) (6,382)
Payments for acquisitions, net of cash acquired 0 (33)
Net cash used in investing activities (5,101) (6,415)
Financing activities    
Payments of contingent consideration due to seller 0 (253)
Proceeds from exercise of stock options 381 37
Employee tax withholdings related to net share settlements of equity-based awards (1,541) (1,978)
Purchases of treasury stock (10,349) (10,371)
Purchases of Convertible Notes (88,961) (7,783)
Proceeds from borrowing on ABL facility 100,000 0
Net cash used in financing activities (470) (20,348)
Increase (Decrease) in cash and cash equivalents 4,097 (2,686)
Cash and cash equivalents, beginning of period 34,626 40,281
Cash and cash equivalents, end of period 38,722 37,595
Supplemental disclosure of cash flow information    
Cash paid during the period for interest 1,156 298
Cash received during the period for income taxes refunded 0 3,348
Noncash financing activity    
Liability for purchases of treasury stock not yet settled $ 0 $ 257