Commitments and contingencies - Lease agreements (Details)
$ in Thousands
1 Months Ended 3 Months Ended 9 Months Ended 30 Months Ended
Oct. 22, 2019
USD ($)
ft²
Aug. 01, 2019
USD ($)
ft²
Jun. 30, 2019
USD ($)
ft²
Jun. 30, 2018
USD ($)
ft²
Option
Apr. 30, 2016
Dec. 31, 2015
USD ($)
Dec. 31, 2019
USD ($)
Dec. 31, 2019
USD ($)
Dec. 31, 2016
USD ($)
Jun. 30, 2019
USD ($)
Apr. 01, 2019
USD ($)
Mar. 31, 2019
USD ($)
Lease agreements                        
Number of options to extend lease agreement (in years)           5 years            
Monthly lease payments, inclusive of base rent and ancillary charges           $ 7            
Prior notice period upon termination of lease         9 months              
Base rent of monthly lease payments                 $ 23 $ 31    
Leased office space | ft² 53,000 10,500 18,700 63,000                
Rentable office space | ft²       106,000                
Lease term     10 years 10 years           10 years    
Number of options to renewal the lease | Option       2                
Renewal period of lease     5 years 5 years           5 years    
Annual rental payment     $ 488 $ 2,373                
Percentage of annual increase in lease rental expenses     1.60% 3.00%           1.60%    
Property, plant and equipment, net             $ 5,654 $ 5,654       $ 12,159
Financing obligation                       6,561
Right-to-use asset $ 18,425 $ 2,368         4,731 4,731        
Right-to-use liability     $ 4,363       4,897 4,897   $ 4,363    
Operating lease, remained payable             516          
ASU 2016-02                        
Lease agreements                        
Property, plant and equipment, net                     $ 645  
Long term prepaid rent                     5,006  
Right-to-use asset                     789  
Right-to-use liability                     $ 837  
General and administrative expenses                        
Lease agreements                        
Finance Lease Cost             90 149        
Research and development expenses                        
Lease agreements                        
Finance Lease Cost             $ 517 $ 517        
Leasehold improvements                        
Lease agreements                        
Property, plant and equipment, net                       $ 11,514