add battery level checking