| Share based compensation - Options Exercised (Details) - USD ($) | 12 Months Ended | ||
|---|---|---|---|
| Dec. 31, 2018 | Dec. 31, 2017 | Dec. 31, 2016 | |
| Share based compensation | |||
| Option Exercised (in shares) | 5,334,936 | 1,142,904 | 63,192 | 
| Intrinsic value of stock options exercised | $ 6,727,000 | $ 1,522,000 | $ 40,000 | 
| Proceeds from exercise of stock options | 3,037,000 | 401,000 | 17,000 | 
| Tax benefit from stock option exercises | $ 1,325,000 | $ 73,000 | $ 8,000 | 
| X | ||||||||||
| 
- Definition Amount of tax benefit from exercise of stock options granted under share-based compensation arrangement. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Amount of cash inflow from exercise of stock options granted under share-based compensation arrangement. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 | 
| X | ||||||||||
| 
- Definition Amount of accumulated difference between fair value of underlying shares on dates of exercise and exercise price on options exercised (or share units converted) into shares. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Definition Number of share options (or share units) exercised during the current period. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 |