| Share based compensation - Unrecognized Compensation Cost (Details) $ in Thousands | 12 Months Ended | 
|---|---|
| Dec. 31, 2018  USD ($) | |
| Share based compensation | |
| Unrecognized compensation cost | $ 13,686 | 
| Expected weighted-average cost recognition period (in years) | 2 years 10 months 24 days | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Weighted average period over which unrecognized compensation is expected to be recognized for equity-based compensation plans, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Unrecognized cost of unvested options awarded to employees as compensation. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 |