New charging algorithm could double life of li-ion batteries