| Years ended December 31, | ||||||||
| 201 7 | 20 1 6 | |||||||
| Deferred tax assets: | ||||||||
| Net operating loss carryforwards | $ | 28,500 | $ | 41,500 | ||||
| Capitalized research and development | 16,500 | 27,400 | ||||||
| Research and development credits | 12,500 | 11,500 | ||||||
| Stock -based compensation | 3,600 | 6,900 | ||||||
| Deferred revenue s | — | 100 | ||||||
| Other, net | 1,600 | 2,200 | ||||||
| Total deferred tax assets | 62,700 | 89,600 | ||||||
| Total deferred tax liabilities | — | — | ||||||
| Net deferred tax assets | 62,700 | 89,600 | ||||||
| Valuation allowance for deferred tax assets | (62,700 | ) | (89,600 | ) | ||||
| Net deferred tax assets | $ | — | $ | — | ||||
| 201 7 | 201 6 | 20 1 5 | ||||||||||
| Federal income taxes at 35% | $ | (442 | ) | $ | (3,740 | ) | $ | (4,426 | ) | |||
| State income tax, net of F ederal benefit | 21 | (26 | ) | 1 | ||||||||
| Tax effect on non-deductible expenses and credits | 2,180 | 3,054 | 968 | |||||||||
| Expiring state net operating losses | 8 | 11 | 143 | |||||||||
| Research credits | (153 | ) | (427 | ) | (635 | ) | ||||||
| Uncertain tax positions | 38 | 173 | 2,038 | |||||||||
| Tax Cuts and Jobs Act | 28,732 | — | — | |||||||||
| Excess tax benefit | (3,425 | ) | — | — | ||||||||
| Rate change | (43 | ) | (639 | ) | 6,066 | |||||||
| Other | (1 | ) | (123 | ) | (10 | ) | ||||||
| Chang e in valuation allowance | (26,915 | ) | 1,717 | (4,145 | ) | |||||||
| $ | — | $ | — | $ | — | |||||||
| 201 7 | 201 6 | 201 5 | ||||||||||
| Balance at beginning of year | $ | 8,268 | $ | 7,447 | $ | 4,360 | ||||||
| Additions based on tax positions related to the current year | 57 | 139 | 195 | |||||||||
| Additions based on tax positions of prior years | — | 682 | 2,994 | |||||||||
| Reductions based on tax positions of prior years | — | — | (102 | ) | ||||||||
| Balance at end of year | $ | 8,325 | $ | 8,268 | $ | 7,447 | ||||||