XML 16 R5.htm IDEA: XBRL DOCUMENT v3.8.0.1
CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS (Unaudited) - USD ($)
$ in Thousands
9 Months Ended
Sep. 30, 2017
Sep. 30, 2016
Cash flows from operating activities:    
Net income (loss) $ 53,616 $ (59,522)
Adjustments to reconcile net income (loss) to cash provided by (used in) operating activities:    
Depreciation, depletion, and amortization 33,848 19,839
Loss on termination of financing agreements 1,804 0
Non-cash interest expense 6,189 11,426
Change in value of common stock warrants 2,211 (3,477)
Change in value of contingent consideration 0 (10,753)
Deferred taxes 462 (8,565)
Stock-based compensation 5,803 5,103
Unrealized loss (gain) on derivative contracts 557 (5,804)
Equity (earnings) losses from Laramie Energy, LLC (11,651) 15,159
Net changes in operating assets and liabilities:    
Trade accounts receivable 12,070 3,233
Prepaid and other assets 46,747 29,258
Inventories (121,040) 50,390
Deferred turnaround expenditures 0 (34,969)
Obligations under inventory financing agreements 89,549 (11,795)
Accounts payable and other accrued liabilities (14,709) (35,941)
Contingent consideration 0 (4,830)
Net cash provided by (used in) operating activities 105,456 (41,248)
Cash flows from investing activities:    
Acquisitions of businesses, net of cash acquired 0 (209,183)
Capital expenditures (19,888) (19,276)
Proceeds from sale of assets 19 2,323
Change in restricted cash 502 (10,000)
Investment in Laramie Energy, LLC 0 (55,000)
Net cash used in investing activities (19,367) (291,136)
Cash flows from financing activities:    
Proceeds from sale of common stock, net of offering costs 0 49,315
Proceeds from borrowings 239,538 301,782
Repayments of borrowings (292,684) (137,791)
Net borrowings (repayments) on deferred payment arrangement (1,493) 26,654
Payment of deferred loan costs (50) (6,805)
Contingent consideration settlements 0 (11,980)
Other financing activities, net (872) (325)
Net cash provided by (used in) financing activities (55,561) 220,850
Net increase (decrease) in cash and cash equivalents 30,528 (111,534)
Cash and cash equivalents at beginning of period 47,772 167,788
Cash and cash equivalents at end of period 78,300 56,254
Net cash received (paid) for:    
Interest (15,168) (7,573)
Taxes (1,115) 139
Non-cash investing and financing activities:    
Accrued capital expenditures 4,469 2,583
Value of warrants and debt reclassified to equity $ 0 $ 3,084