anchor.diff:  	}
   }
   
  -// return if any to is found
  -/*
  -function knot(current){
  -	traverse_counter++;
  -	if(current.to.length == 0 || traverse_counter > 100){
  -		return false;
  -	}
  -
  -	for(var i = 0; i < current.to.length; i++){
  -		current.node.joint(nodes2[current.to[i]].node, fsa.arrow).registerForever(nodes);
  -		knot(current);
  -	}
  -	return true;
  -}
  -*/
  -
   $(function() {
   
   	$("#submitButton").click(submitButtonClicked);
  
positive.code: 	var keyLength = 0;
  	var allNodes = [];
  	var nodes2 = {};
  	var cStart = fsa.State.create({ 
  		position: {x: 200, y: yPos}
  		, label: "Start" 
  		, radius: 15
  		, attrs: {
  			stroke: "blue",
  			fill: "yellow",
  			id: "aaa"
  		  }
  	});
  	allNodes.push(cStart);
  	nodes2["start"] = { node: cStart, to : [ res.start.to] };
  	weightedNodes["start"] = { to : [ res.start.to] };
  	keyLength++;
  
  
  	for(var i = 0; i < res.decisionOrForkOrJoin.length; i++){
  		yPos += 100;
  		var circle = fsa.State.create({ position: {x: 200, y: yPos}, label: res.decisionOrForkOrJoin[i].name });
  //		if(res.decisionOrForkOrJoin[i].java !=null){
  //			var java = res.decisionOrForkOrJoin[i].java;
  //		}
  
  		allNodes.push(circle);
  
  		// kill does not have ok and error
  		if(res.decisionOrForkOrJoin[i].ok === undefined && res.decisionOrForkOrJoin[i].error === undefined){
  			nodes2[res.decisionOrForkOrJoin[i].name] = {node: circle, to : []};
  			weightedNodes[res.decisionOrForkOrJoin[i].name] = { to : [] };
  		}else{
  			nodes2[res.decisionOrForkOrJoin[i].name] = {node: circle, to : [ res.decisionOrForkOrJoin[i].ok.to, res.decisionOrForkOrJoin[i].error.to]};
  			weightedNodes[res.decisionOrForkOrJoin[i].name] = { to : [res.decisionOrForkOrJoin[i].ok.to, res.decisionOrForkOrJoin[i].error.to] };
  		}
  		keyLength++;
  
negative.code: var traverse_counter = 0;
  var weightedNodes = {};
  
  var PAPER_WITH = 500;
  function drawDiagram(res){
  	Joint.paper("myfsa1", PAPER_WITH, 1000);
  	var fsa = Joint.dia.fsa;
  
  	var yPos = 50;
  