added battery management parts