public void recalculate(String IPkey, String IPComing, ArrayList<String> comingConnections){
        ArrayList<String[]> tempArray = (ArrayList<String[]>)routingTable.get(IPkey);
        String[] tempStringArray = null;
        for(int i=0; i<tempArray.size(); i++){
            tempStringArray = tempArray.get(i);
            if(tempStringArray[0].equals(IPComing)){
                for(int j=0; j<comingConnections.size(); j++){
                    if(tempStringArray[1].equals(getAddress(comingConnections.get(j)))){
                        tempStringArray[2] = Integer.toString(Integer.parseInt(searchForCost(tempArray, IPComing)) +
                                            Integer.parseInt(getDistance(comingConnections.get(j))));
                    }
                }
            }
        }
    }