batterycharges is an unused variable now.