adding check for tailname