added if clause using saveTags()