changes for better dealing with tags