battery vs capacitor explained