battery check main program