BATTERY FUNCTION