Scientists harness the second life of a spent battery material