XML 130 R105.htm IDEA: XBRL DOCUMENT v3.19.1
Commitments and contingencies - Additional Information (Details) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2018
Dec. 31, 2017
Dec. 31, 2016
Commitments and Contingencies Disclosure [Abstract]      
Operating leases rent expense $ 4,940 $ 4,245 $ 3,904
Total principal amount of loans repurchased or indemnified $ 6,646 $ 4,704 $ 8,326