XML 54 R40.htm IDEA: XBRL DOCUMENT v3.6.0.2
Summary of significant accounting policies (Allowance for doubtful accounts) (Details) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2016
Dec. 31, 2015
Dec. 31, 2014
Allowance for Doubtful Accounts Receivable [Roll Forward]      
Balance at beginning of period $ 8,119 $ 5,646 $ 5,725
Charged to expense 485 4,358 2,492
Deductions or other (5,273) (1,885) (2,571)
Balance at end of period $ 3,331 $ 8,119 $ 5,646