cleaner way of getting tag name (#50)