change tag_extract method to extract_tag