PALO ALTO, Calif. (AP) — A week after posting a huge first quarter loss and saying the company needs to raise cash, Tesla is doing just that and CEO Elon Musk will buy $10 million worth of stock in an $1.5 billion offering of shares and convertible notes.

Tesla said Thursday that it’s offering $650 million of common stock and $1.35 billion in convertible senior notes due in 2024 in two separate offerings.

The company anticipates gross proceeds of about $2.3 billion, before discounts and expenses.

Last week, Tesla reported its cash balance at the end of the first quarter shrunk by $1.5 billion since December, to $2.2 billion. Musk said during a conference call that Tesla might need to raise capital again.

Tesla lost $702.1 million in the first quarter, among the company’s worst quarters in the past two years. Its sales tumbled 31% in the period. Musk predicted another loss in the second quarter but said Tesla would be back in the black in the third quarter. The first quarter loss came after two consecutive profitable quarters, the first time that’s happened in Tesla’s 15-year history.

Tesla has lost more than $6 billion since setting out to revolutionize the auto industry at its inception, but Musk foresees a profitable future fueled in part by a ride-hailing service made up of electric cars driven by robots.

Shares of Tesla Inc. jumped 5 percent before the opening bell.