how a car battery works