add addunit loop code