add battery class and check the connection after the battery is clicked