12. COMMITMENTS AND CONTINGENCIES Operating Leases We lease our corporate headquarters and an adjacent office facility from an entity controlled by our principal stockholders. The five-year operating lease for our corporate headquarters ended in November 2018 and the Company is currently in the process of negotiating an amendment to extend the lease term. The operating lease for the adjacent facility ended in July 2018 and the Company is currently in the process of negotiating an amendment to extend the lease term. We also lease several other buildings from our principal stockholders on a month-to-month basis. In addition, we lease offices from unrelated parties with remaining terms of one to ten years. Future aggregate minimum annual lease payments under these leases at December 31, 2018 are as follows: Year Ended December 31, Related Parties Others Total 2019 $ 1,516 $ 3,519 $ 5,035 2020 1,407 3,386 4,793 2021 1,253 2,466 3,719 2022 1,253 1,490 2,743 2023 1,149 820 1,969 2024 and thereafter  1,395 1,395 Total rent expense aggregated $5,428, $5,225, and $4,753 for the years ended December 31, 2018, 2017, and 2016, respectively, under the terms of the operating leases described above. Such amounts included $1,651, $1,647, and $1,640 in 2018, 2017, and 2016, respectively, paid to related parties. Contingencies We are subject to various legal proceedings and claims, including patent infringement claims, which have arisen during the ordinary course of business. In the opinion of management, the outcome of such matters is not expected to have a material effect on our business, financial position, results of operations, or cash flows. We record a liability when we believe that a loss is both probable and reasonably estimable. On a quarterly basis, we review each of these legal proceedings to determine whether it is probable, reasonably possible, or remote that a liability has been incurred and, if it is at least reasonably possible, whether a range of loss can be reasonably estimated. Significant judgment is required to determine both the likelihood of there being a loss and the estimated amount of such loss. Until the final resolution of such matters, there may be an exposure to loss in excess of the amount recorded, and such amounts could be material. We expense legal fees in the period in which they are incurred. We are subject to audits by states on sales and income taxes, employment matters, and other assessments. Additional liabilities for these and other audits could be assessed, and such outcomes could have a material negative impact on our financial position, results of operations, and cash flows.