public Transition addLabelToOutgoingTransition(Transition t, String label) throws Exception, NoSuchTransitionException{
         if(outgoingTransitions.contains(t)) {
             for (Transition trans : outgoingTransitions) {
                 if(trans == t)
                     continue;
                 if (trans.getInput().contains(label)) {
                     String t_from = t.getFromState().getState_Properties().getName();
                     String t_to = t.getToState().getState_Properties().getName();
                     String from = trans.getFromState().getState_Properties().getName();
                     String to = trans.getToState().getState_Properties().getName();
                     throw new Exception("Trying to label transition from "+t_from+" to "+t_to+" with '"+label+"' but transition from " + from + " to " + to + " is already labled with '" + label + "'.");
                 }
             }
             t.addToInput(label);
             return t;
         } else {
             throw new NoSuchTransitionException();
         }
    }