added some changes to the Battery class