reworked functions called by extract_taxonomy