modified taxon replacement script