add battery.js file