How does an electric vehicle battery work?