CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($)
$ in Thousands
9 Months Ended
Sep. 30, 2016
Sep. 30, 2015
Operating activities    
Net income (loss) $ 8,940 $ (999)
Adjustments to reconcile net income (loss) to net cash provided by operating activities:    
Depreciation expense 2,402 2,146
Amortization of intangible assets 3,393 1,113
Loss on disposal of fixed assets 13  
Provision for doubtful accounts 313 281
Investment premium amortization 293  
Stock-based compensation 5,933 5,336
Tax benefit from business acquistion (9,402)  
Changes in assets and liabilities:    
Accounts receivable (3,469) (2,097)
Inventories (6,776) (1,779)
Prepaid expenses and other current assets 1,740 (566)
Other assets (341) (247)
Accounts payable 2,333 342
Accrued liabilities 421 (622)
Deferred revenue 291 347
Other long-term liabilities (451) (298)
Net cash provided by operating activities 5,633 2,957
Investing activities    
Purchases of available-for-sale investments (10,147) (49,095)
Proceeds from sales of available-for-sale investments 900 2,018
Proceeds from maturities of available-for-sale investments 33,858 49,535
Purchases of property and equipment (1,780) (2,917)
Business acquisitions, net of cash acquired (32,891) (8,380)
Net cash used in investing activities (10,060) (8,839)
Financing activities    
Proceeds from exercise of options for common stock 3,021 1,127
Repurchase of common stock (3,242) (4,942)
Repayment of notes payable (581) (722)
Proceeds from revolving credit facility 5,000  
Repayment of revolving credit facility (3,500)  
Payment of debt issuance costs (89)  
Net cash provided by (used in) financing activities 609 (4,537)
Effect of exchange rate changes on cash and cash equivalents (41) (31)
Net decrease in cash and cash equivalents (3,859) (10,450)
Cash and cash equivalents at beginning of period 29,530 29,187
Cash and cash equivalents at end of period 25,671 18,737
Supplemental disclosure of cash flow information    
Cash paid for interest 164 85
Cash paid for taxes 858 431
Supplemental schedule of non-cash investing and financing activities    
Net unrealized losses on available-for-sale investments $ 60 $ 65