changed array type of storing battery data to integer