extract_tags method