join then loop through array