moved battery monitor to class