how to work out a capacity of a battery