Income taxes - Changes in valuation allowance (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Dec. 31, 2016 |
Dec. 31, 2015 |
Dec. 31, 2014 |
|
| Changes in the valuation allowance | |||
| Balance at the beginning of the year | $ 19,548 | $ 12,470 | $ 4,101 |
| Additions charged to operations | 16,783 | 7,078 | 8,369 |
| Decrease credited to operations | 0 | 0 | 0 |
| Balance at the end of the year | $ 36,331 | $ 19,548 | $ 12,470 |
| Period of cumulative results for determination of releasing valuation allowance | 3 years | ||