Added code to retrieve unique tags