2023 and September 20, 2022, respectively. The reduction in gross margin was primarily driven by an increase in the revenue share percentage due to Ascensia, sales channel mix and increased manufacturing and logistics costs.
Research and development expenses
Research and development expenses were $38.0 million for the nine months ended September 30, 2023, compared to $28.1 million for the nine months ended September 30, 2022, an increase of $9.9 million. The increase was primarily due to investments for next generation technologies including a $6.1 million increase in clinical studies activities, an increase of $3.8 million in personnel costs, consulting, contract fabrication and other research and development support services.
Selling, general and administrative expenses
Selling, general and administrative expenses were $22.6 million for the nine months ended September 30, 2023, compared to $23.8 million for nine months ended September 30, 2022, a decrease of $1.2 million. The decrease was primarily due to a $0.6 million reduction in personnel costs, a $0.8 million reduction in other general and administrative costs to include recruiting and associated employee overhead and local tax expenses offset by $0.2 million increase in legal expenses.
Total other income (expense), net
Total other income (expense), net, was $15.4 million for the nine months ended September 30, 2023, compared to other income (expense), net, of $180.3 million for the nine months ended September 30, 2022, a decrease in other income of $164.9 million. The change was primarily due to a $145.7 million change in fair value of derivatives, a $41.3 million change in fair value of option, offset by an $14.2 million net extinguishment loss on the exchange of the PHC Notes and 2025 Notes, $3.0 million increase in interest income, $4.4 million decrease in interest expense, change in impairment cost of $0.1 million, and an increase of $0.3 million in other income, net.
Liquidity and Capital Resources
Sources of Liquidity
From its founding in 1996 until 2010, the Company has devoted substantially all of its resources to researching various sensor technologies and platforms. Beginning in 2010, the Company narrowed its focus to developing and refining a commercially viable glucose monitoring system. The Company has incurred substantial losses and cumulative negative cash flows from operations since its inception in October 1996 and expects to incur additional losses in the near future. We incurred total gross profit of $2.7 million, ($0.8) million, and ($17.4) million for the years ended December 31, 2022, 2021 and 2020, respectively. For the three months ending September 30, 2023, the Company had gross profit of $1.2 million and an accumulated deficit of $852.1 million. To date, the Company has funded its operations principally through the issuance of preferred stock, common stock, warrants, convertible notes, and debt. As of September 30, 2023, the Company had cash, cash equivalents and marketable securities of $125.4 million.
On September 8, 2023 (the “Effective Date”), the Company entered into a Loan and Security Agreement (the “Loan Agreement”) with the several financial institutions or entities party thereto (collectively, the “Lenders") and Hercules Capital, Inc., a Maryland corporation (“Hercules”), pursuant to which the Lenders have agreed to make available to the Company up to $50.0 million in senior secured term loans (the “Term Loan Facility”), consisting of (i) an initial term loan of $25.0 million (the “Tranche 1 Loan”), which was funded on the Effective Date and (ii) two additional tranches of term loans in the amounts of up to $10.0 million (the “Tranche 2 Loan”) and $15.0 million (the “Tranche 3 Loan”), respectively, which will become available to the Company upon the Company’s satisfaction of certain terms and conditions set forth in the Loan Agreement. The loans under the Loan Agreement mature on September 1, 2027 (the “Maturity Date”).
On August 10, 2023, the Company entered into separate, privately negotiated exchange agreements (the “Exchange Agreements”) with a limited number of holders (the “Noteholders”) of the Company’s currently outstanding