code to retrieve tag identifier