public static Integer getTeamID(String team) throws ParserConfigurationException, SAXException, IOException{
            
            boolean found = Boolean.FALSE;
            int temp = 0, id = -1, distance = 100;
            String name;
            HashMap <Integer, Integer>  dLevenshtein = new HashMap<>();
            
            
            File fXmlFile = new File(configuration.getAliasFile());
            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
            Document doc = dBuilder.parse(fXmlFile);
            doc.getDocumentElement().normalize();
 
            NodeList nList = doc.getElementsByTagName("team");
            
            while((!found)&&(temp<nList.getLength())){

                Node nNode = nList.item(temp);
                if (nNode.getNodeType() == Node.ELEMENT_NODE) {

                        Element eElement = (Element) nNode;
                        id = Integer.parseInt(eElement.getElementsByTagName("id").item(0).getTextContent());
                        name = eElement.getElementsByTagName("name").item(0).getTextContent();
                        //calculate levenshtein distance
                        distance = computeLevenshteinDistance(team.toLowerCase(),name.toLowerCase());
                        //check if the distanc is lower than the previous                       
                        if(!dLevenshtein.containsKey(id)){
                            dLevenshtein.put(id,distance);
                            
                        }else{
                            if(dLevenshtein.get(id) > distance){
                                dLevenshtein.put(id, distance);                                
                            }
                        }

                        if (team.toLowerCase().equals(name.toLowerCase())){
                            found = Boolean.TRUE; 
                        }
                }
                temp++;
            }//while
            //if the team is new, return the id
            //whit the lowest distance
            if(!found){
                for (Integer k: dLevenshtein.keySet()){
                    if(distance > dLevenshtein.get(k)){
                        distance = dLevenshtein.get(k);
                        id = k;                        
                    }
                }
            }
            return id;
            
        }