Added logic for adding new tags