| Income taxes - Change in Valuation Allowance (Details) - USD ($) $ in Thousands | 12 Months Ended | |
|---|---|---|
| Dec. 31, 2018 | Dec. 31, 2017 | |
| Valuation allowance, beginning | $ 27,433 | |
| Impact of adopting ASC 606 | $ (1,469) | |
| Increase in valuation allowance | 16,659 | 8,098 | 
| Foreign exchange translation adjustments | (1,847) | 1,722 | 
| Valuation allowance, ending | 40,776 | 27,433 | 
| Previously Reported | ||
| Valuation allowance, beginning | 27,433 | 17,613 | 
| Valuation allowance, ending | 27,433 | |
| Restatement Adjustment | ||
| Valuation allowance, beginning | $ 25,964 | 17,613 | 
| Valuation allowance, ending | $ 25,964 | |
| X | ||||||||||
| 
- Definition Amount of decrease in the valuation allowance for a foreign currency translation adjustments, deferred tax asset. No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of increase (decrease) in the valuation allowance due to adoption of a new accounting pronouncement. No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of deferred tax assets for which it is more likely than not that a tax benefit will not be realized. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of increase (decrease) in the valuation allowance for a specified deferred tax asset. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |