public void makeMarkov() {
        //System.out.println("Estats: " + estats.size());
        State st = null;
        State to = null;

        // fallback connections
        Set<String> fallset = fallbacks.keySet();
        //System.out.println("Fallbacks: " + fallset.size());
        Iterator<String> fallit = fallset.iterator();

        while (fallit.hasNext()) {
            String str = fallit.next();
            String strto = fallbacks.get(str);

            st = findState(str);
            to = findState(strto);

            if ((st != null) && (to != null)) {
                st.addMasterConnection(to);
            }
        }

        // normal connections
        Set<Pair<String, String>> set = connections.keySet();
        //System.out.println("Connections: " + set.size());
        Iterator<Pair<String, String>> it = set.iterator();
        while (it.hasNext()) {
            Pair<String, String> pr = it.next();
            Pair<String, Int> sc = connections.get(pr);

            String stname = pr.getFirst();
            String cntag = pr.getSecond();
            String cnto = sc.getFirst();
            Int cncounter = sc.getSecond();

            st = findState(stname);
            to = findState(cnto);
            if ((st != null) && (to != null)) {
                st.addConnection(cntag, to);
                st.setTransitions(cntag, cncounter);
            }
        }

        for (State est : estats) {
            est.setMaxConnections(alfabet.size()+1);
        }
    }