| Share-based compensation - Options Granted to Nonemployees (Details) - USD ($) $ in Thousands | 3 Months Ended | 9 Months Ended | |||
|---|---|---|---|---|---|
| Sep. 30, 2017 | Sep. 30, 2016 | Sep. 30, 2017 | Sep. 30, 2016 | Dec. 31, 2016 | |
| Share based compensation | |||||
| Number of options granted outstanding (in shares) | 74,145,505 | 74,145,505 | 49,237,290 | ||
| Nonemployees | |||||
| Share based compensation | |||||
| Number of options granted outstanding (in shares) | 3,224,600 | 3,224,600 | |||
| Share based payment expense (benefit) | $ 297 | $ (24) | $ 401 | $ (139) | |
| X | ||||||||||
| 
- Definition Represents the expense (benefit) recognized during the period arising from equity-based compensation arrangements with nonemployees. No definition available. 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Number of options outstanding, including both vested and non-vested options. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Details 
 |