| Recently adopted accounting standards |
The impacts of adopting ASC 606 on the Consolidated Balance Sheet for the year ended December 31, 2017 are as follows (amounts in thousands): | | | | | | | | | | | | | | | | Balance as of December 31, 2017 | | | As Previously Reported | | Adoption of ASC 606 | | As Reported | Trade receivables, net | | $ | 15,076 |
| | $ | 2,701 |
| | $ | 17,777 |
| Prepaid expenses and other current assets | | 9,252 |
| | (3,164 | ) | | 6,088 |
| Retained deficit | | $ | (243,388 | ) | | $ | 463 |
| | $ | (243,851 | ) |
The impacts of adopting ASC 606, including accounting for byproduct sales as revenue instead of as a credit to cost of goods sold, on the Consolidated Statement of Operations for the years ended December 31, 2017 and 2016, are as follows (amounts in thousands): | | | | | | | | | | | | | | | | Year ended December 31, 2017 | | | As Previously Reported | | Adoption of ASC 606 | | As Reported | Sales | | $ | 163,919 |
| | $ | 13,996 |
| | $ | 177,915 |
| Freight costs | | 29,039 |
| | 2,977 |
| | 32,016 |
| Cost of goods sold | | 106,341 |
| | 11,621 |
| | 117,962 |
| Lower of cost or NRV adjustments inventory adjustments | | 7,324 |
| | (945 | ) | | 6,379 |
| Gross Margin | | 11,545 |
| | 343 |
| | 11,888 |
| Net Loss | | $ | (22,910 | ) | | $ | 343 |
| | $ | (22,567 | ) | | | | | | | | | | Year ended December 31, 2016 | | | As Previously Reported | | Adoption of ASC 606 | | As Reported | Sales | | $ | 210,948 |
| | $ | 1,149 |
| | $ | 212,097 |
| Freight costs | | 36,256 |
| | (194 | ) | | 36,062 |
| Cost of goods sold | | 170,852 |
| | (1,107 | ) | | 169,745 |
| Gross Deficit | | (29,247 | ) | | 2,450 |
| | (26,797 | ) | Net Loss | | $ | (66,633 | ) | | $ | 2,450 |
| | $ | (64,183 | ) |
The impacts of adopting ASC 606 and ASU 2016-18 on the Consolidated Statement of Cash Flows for the years ended December 31, 2017 and 2016, are as follows: | | | | | | | | | | | | | | | | | | | | | | | | Year ended December 31, 2017 | | | As Previously Reported | | Adoption of ASC 606 | | Adoption of ASU 2016-15 | | Adoption of ASU 2016-18 | | As Reported | Net loss | | $ | (22,910 | ) | | $ | 343 |
| | $ | — |
| | $ | — |
| | $ | (22,567 | ) | Lower of cost or NRV inventory adjustments | | 7,324 |
| | (945 | ) | | — |
| | — |
| | 6,379 |
| Changes in certain assets and liabilities | | (9,681 | ) | | 602 |
| | 3,001 |
| | (3,525 | ) | | (9,603 | ) | Net cash provided by (used in) operating activities | | 17,217 |
| | — |
| | 3,001 |
| | (3,525 | ) | | 16,693 |
| Debt prepayment costs | | — |
| | — |
| | (3,001 | ) | | — |
| | (3,001 | ) | Net cash used in financing activities | | (12,759 | ) | | — |
| | (3,001 | ) | | — |
| | (15,760 | ) | Net decrease in cash, cash equivalents and restricted cash | | (3,396 | ) | | — |
| | — |
| | (3,525 | ) | | (6,921 | ) | Cash, cash equivalents and restricted cash, beginning of the period | | 4,464 |
| | — |
| | — |
| | 4,006 |
| | 8,470 |
| Cash, cash equivalents and restricted cash, end of the period | | $ | 1,068 |
| | $ | — |
| | $ | — |
| | $ | 481 |
| | $ | 1,549 |
| | | | | | | | | | | | | | Year ended December 31, 2016 | | | As Previously Reported | | Adoption of ASC 606 | | Adoption of ASU 2016-15 | | Adoption of ASU 2016-18 | | As Reported | Net loss | | $ | (66,633 | ) | | $ | 2,450 |
| | $ | — |
| | $ | — |
| | $ | (64,183 | ) | Changes in certain assets and liabilities | | (19,856 | ) | | (2,450 | ) | | — |
| | 3,530 |
| | (18,776 | ) | Net cash (used in) provided by operating activities | | (18,271 | ) | | — |
| | — |
| | 3,530 |
| | (14,741 | ) | Net (decrease) increase in cash, cash equivalents and restricted cash | | (4,844 | ) | | — |
| | — |
| | 3,530 |
| | (1,314 | ) | Cash, cash equivalents and restricted cash, beginning of the period | | 9,308 |
| | — |
| | — |
| | 476 |
| | 9,784 |
| Cash, cash equivalents and restricted cash, end of the period | | $ | 4,464 |
| | $ | — |
| | $ | — |
| | $ | 4,006 |
| | $ | 8,470 |
|
|