add onBattery method