charging energy storage devices