CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2016
Dec. 31, 2015
Dec. 31, 2014
Operating activities      
Net income (loss) $ 12,954 $ (1,652) $ 8,156
Adjustments to reconcile net income (loss) to net cash provided by operating activities:      
Depreciation expense 3,318 2,926 2,547
Amortization of intangible assets 4,598 1,474 491
Loss on disposal of fixed assets 13    
Provision for doubtful accounts 345 345 229
Investment premium amortization 339    
Stock-based compensation 8,370 7,034 5,341
Tax benefit from business acquisition (9,402)    
Excess tax benefit from exercise of options for common stock (89)   (91)
Changes in assets and liabilities:      
Accounts receivable (3,765) (1,127) (5,331)
Inventories (1,589) (3,488) 1,025
Restricted cash     (330)
Prepaid expenses and other current assets 1,184 (1,443) (323)
Other assets (295) (264) (209)
Accounts payable (32) 615 1,698
Accrued liabilities 1,999 248 (2,110)
Deferred revenue 471 258 199
Other long-term liabilities (553) (512) (44)
Net cash provided by operating activities 17,866 4,414 11,248
Investing activities      
Purchases of available-for-sale investments (19,227) (50,619) (89,844)
Proceeds from sales of available-for-sale investments 900 2,018 2,850
Proceeds from maturities of available-for-sale investments 42,203 65,142 18,915
Purchases of property and equipment (2,682) (3,772) (2,710)
Business acquisitions, net of cash acquired (32,891) (8,380) (1,116)
Net cash provided by (used in) investing activities (11,697) 4,389 (71,905)
Financing activities      
Proceeds from exercise of options for common stock 3,437 1,360 6,411
Excess tax benefit from exercise of options for common stock 89   91
Repurchase of common stock (3,242) (9,020)  
Repayment of notes payable (913) (915) (1,138)
Proceeds from revolving credit facility 5,000    
Repayment of revolving credit facility (5,000)    
Payment of debt issuance costs (89)    
Net cash provided by (used in) financing activities (718) (8,575) 5,364
Effect of exchange rate changes on cash and cash equivalents (168) 115 (66)
Net change in cash and cash equivalents 5,283 343 (55,359)
Cash and cash equivalents at beginning of period 29,530 29,187 84,546
Cash and cash equivalents at end of period 34,813 29,530 29,187
Supplemental disclosure of cash flow information      
Cash paid for interest 204 101 188
Cash paid for taxes 1,115 831 246
Supplemental schedule of non-cash investing and financing activities      
Landlord paid tenant improvements 39   739
Purchases of property and equipment financed by accounts payable 135   257
Net unrealized gains (losses) on available-for-sale investments $ 46 $ (14) $ (47)