added battery monitoring