The company is getting credit for the money it has put into electric and autonomous vehicles