Consolidated Statements of Cash Flows (Unaudited) - USD ($)
$ in Thousands
6 Months Ended
Jun. 30, 2018
Jun. 30, 2017
Operating activities    
Net income (loss) $ 12,405 $ (3,117)
Adjustments to reconcile net income (loss) to net cash provided by operating activities:    
Deferred income taxes 2,943 1,254
Noncash stock compensation expense 4,737 5,081
Noncash interest expense 4,211 3,974
Change in contingent consideration due to seller 100 365
Change in contingent consideration due from seller 0 (79)
Gain on disposal of assets 0 13
Depreciation and amortization 17,939 16,014
Change in assets:    
Accounts receivable (71,543) (36,254)
Income taxes receivable 745 (3,036)
Prepaid expenses and other assets (3,407) 593
Change in liabilities:    
Accounts payable 63,517 41,187
Accrued expenses and other liabilities 3,409 (625)
Payments of contingent consideration in excess of costs over estimated earnings (375) (245)
Net cash provided by operating activities 34,680 25,125
Investing activities    
Purchases of property and equipment (13,231) (9,549)
Investments in business entities (1,000) 0
Net cash used in investing activities (14,231) (9,549)
Financing activities    
Receipt of contingent consideration due from seller 0 500
Payments of contingent consideration due to seller (550) (450)
Proceeds from exercise of stock options 3,561 138
Employee tax withholdings related to net share settlements of equity-based awards (2,318) (1,530)
Purchases of treasury stock 0 (10,851)
Proceeds from borrowing on ABL facility 12,000 32,000
Repayments of amounts borrowed on ABL facility (12,000) (32,000)
Net cash provided by (used in) financing activities 693 (12,192)
Increase in cash and cash equivalents 21,141 3,385
Cash and cash equivalents, beginning of period 23,515 16,646
Cash and cash equivalents, end of period 44,656 20,031
Supplemental disclosure of cash flow information    
Cash paid during the period for interest 3,282 3,314
Cash paid during the period for income taxes 144 259
Cash received during the period for income taxes refunded $ 129 $ 0