added battery health code