added function to implode tags