improved tag creation