 		//through argument type, reasons and claim
 		public function addArgument(event:MenuEvent):void
 		{
-				if(event.label == "add an argument for this statement")
-				{
-					//create an inference
-					var currInference:Inference = new Inference();
-					//add the inference to map
-					parentMap.addElement(currInference);
-					currInference.visible=false;
-					//create the panel that displays connection information
-					var infoPanel:DisplayArgType = new DisplayArgType;
-					currInference.argType = infoPanel;
-					currInference.argType.inference = currInference;
-					parentMap.addElement(currInference.argType);
-					//add inference to the list of inferences
-					rules.push(currInference);
-					//set the claim of the inference rule to this
-					currInference.claim = this;
-					//create a reason node
-					var reason:ArgumentPanel = new ArgumentPanel();
-					//add reason to the map
-					parentMap.addElement(reason);
-					//push reason to the list of reasons belonging to this particular class
-					currInference.reasons.push(reason);
+			if(event.label == "add an argument for this statement")
+			{
 					
-					//temporary, should be replaced by TID
-					currInference.connectionIDs.push(Inference.connections++);
-					//set the inference of the reason
-					reason.inference = currInference;
-					//register the reason
-					parentMap.layoutManager.registerPanel(reason);
-					//create an invisible box for the inference rule corresponding to the claim
-					var tmpInput:DynamicTextArea = new DynamicTextArea();
-					//add it to the map
-					parentMap.addElement(tmpInput);
-					//set the input box as invisible
-					tmpInput.visible = false;
-					//logical
-					//set the panel to which the input box belongs
-					tmpInput.panelReference = currInference;
-					//add a pointer to the input
-					currInference.input.push(tmpInput);		
-					//binding
-					tmpInput.forwardList.push(currInference.input1);
-					input1.forwardList.push(currInference.input[0]);
-					tmpInput.aid = input1.aid;
-					
-					//create an invisible box for the reason
-					var tmpInput2:DynamicTextArea = new DynamicTextArea();
-					tmpInput2.aid = reason.input1.aid;
-					parentMap.addElement(tmpInput2);
-					tmpInput2.visible = false;
-					tmpInput2.panelReference = currInference;
-					currInference.input.push(tmpInput2);	
-					
-					tmpInput2.forwardList.push(currInference.input1);
-					reason.input1.forwardList.push(tmpInput2);
-					parentMap.layoutManager.registerPanel(currInference);	
-				}
+			}
 		}
 		
 		public function addHandler(event:MouseEvent):void
 		{
-			var menu:Menu = Menu.createMenu(null,addMenuData,false);
-			menu.labelField = "@label";
-			menu.addEventListener(MenuEvent.ITEM_CLICK, addArgument);
-			var globalPosition:Point = localToGlobal(new Point(0,this.height));
-			menu.show(globalPosition.x,globalPosition.y);		
+			//var menu:Menu = Menu.createMenu(null,addMenuData,false);
+			//menu.labelField = "@label";
+			//menu.addEventListener(MenuEvent.ITEM_CLICK, addArgument);
+			//var globalPosition:Point = localToGlobal(new Point(0,this.height));
+			//menu.show(globalPosition.x,globalPosition.y);		
+			//create an inference
+			var currInference:Inference = new Inference();
+			//add the inference to map
+			parentMap.addElement(currInference);
+			currInference.visible=false;
+			//create the panel that displays connection information
+			var infoPanel:DisplayArgType = new DisplayArgType;
+			currInference.argType = infoPanel;
+			currInference.argType.inference = currInference;
+			parentMap.addElement(currInference.argType);
+			//add inference to the list of inferences
+			rules.push(currInference);
+			//set the claim of the inference rule to this
+			currInference.claim = this;
+			//create a reason node
+			var reason:ArgumentPanel = new ArgumentPanel();
+			//add reason to the map
+			parentMap.addElement(reason);
+			//push reason to the list of reasons belonging to this particular class
+			currInference.reasons.push(reason);
+			
+			//temporary, should be replaced by TID
+			currInference.connectionIDs.push(Inference.connections++);
+			//set the inference of the reason
+			reason.inference = currInference;
+			//register the reason
+			parentMap.layoutManager.registerPanel(reason);
+			//create an invisible box for the inference rule corresponding to the claim
+			var tmpInput:DynamicTextArea = new DynamicTextArea();
+			//add it to the map
+			parentMap.addElement(tmpInput);
+			//set the input box as invisible
+			tmpInput.visible = false;
+			//logical
+			//set the panel to which the input box belongs
+			tmpInput.panelReference = currInference;
+			//add a pointer to the input
+			currInference.input.push(tmpInput);		
+			//binding
+			tmpInput.forwardList.push(currInference.input1);
+			input1.forwardList.push(currInference.input[0]);
+			tmpInput.aid = input1.aid;
+			
+			//create an invisible box for the reason
+			var tmpInput2:DynamicTextArea = new DynamicTextArea();
+			tmpInput2.aid = reason.input1.aid;
+			parentMap.addElement(tmpInput2);
+			tmpInput2.visible = false;
+			tmpInput2.panelReference = currInference;
+			currInference.input.push(tmpInput2);	
+			
+			tmpInput2.forwardList.push(currInference.input1);
+			reason.input1.forwardList.push(tmpInput2);
+			parentMap.layoutManager.registerPanel(currInference);
 		}
 		
 		
 		public function checkForEnter(event:KeyboardEvent):void{
 			/*
 			if(event.keyCode==Keyboard.ENTER){
-				MODE=0;
-				// add Reason only
-				var reason:ArgumentPanel = new ArgumentPanel();
-				reason.x = this.gridY*25 + this.width + 100;
-				reason.y = this.gridX*25;	
-				//add reason to the map
-				parentMap.addElement(reason);
-				
-				Alert.show("Select reason to be Universal or Particular statement, by clicking on its label on top");
-				
-				//line saying "therefore" joining claim and reason temporarily
-				thereforeLine.graphics.moveTo(this.width-10,this.height/2);
-				thereforeLine.graphics.lineTo(this.width+100,this.height/2);
-				thereforeText = new Label;
-				thereforeText.x = this.gridY*25+this.width + 10; thereforeText.y = this.gridX*25+50;
-				parentMap.addElement(thereforeText);
-				thereforeText.text = "<== Therefore";
-				
-				var currInference:Inference = new Inference();
-				parentMap.addElement(currInference);
-				currInference.visible = false; currInference.argType.visible = false;
-				currInference.claim = this;
-				currInference.reasons.push(reason);
-				
-				currInference.connectionIDs.push(Inference.connections++);
-				
-				reason.inference = currInference;
-	
-				//create an invisible box for the inference rule corresponding to the claim
-				var tmpInput:DynamicTextArea = new DynamicTextArea();
-				parentMap.addElement(tmpInput);
-				//set the input box as invisible
-				tmpInput.visible = false;
-				//logical
-				//set the panel to which the input box belongs
-				tmpInput.panelReference = currInference;
-				//add a pointer to the input
-				currInference.input.push(tmpInput);		
-				
-				//binding
-				tmpInput.forwardList.push(currInference.input1);
-				input1.forwardList.push(currInference.input[0]);
-				
-				//set the id of the new text box to the id of the one in the reason
-				tmpInput.aid = input1.aid;
-				
-				
-				//create an invisible box for the reason
-				var tmpInput2:DynamicTextArea = new DynamicTextArea();
-				//set its id to the DTA's id present in the reason
-				tmpInput2.aid = reason.input1.aid;
-				parentMap.addElement(tmpInput2);
-				tmpInput2.visible = false;
-				tmpInput2.panelReference = currInference;
-				currInference.input.push(tmpInput2);	
-				
-				tmpInput2.forwardList.push(currInference.input1);
-				reason.input1.forwardList.push(tmpInput2);
-				input1.forwardUpdate();		//claim	
-				reason.input1.forwardUpdate();		//reason
-				
-				
-				// deactive the DONE button to avoid duplicate action
-				doneBtn.removeEventListener(MouseEvent.CLICK,doneHandler);
-		
+			MODE=0;
+			// add Reason only
+			var reason:ArgumentPanel = new ArgumentPanel();
+			reason.x = this.gridY*25 + this.width + 100;
+			reason.y = this.gridX*25;	
+			//add reason to the map
+			parentMap.addElement(reason);
+			
+			Alert.show("Select reason to be Universal or Particular statement, by clicking on its label on top");
+			
+			//line saying "therefore" joining claim and reason temporarily
+			thereforeLine.graphics.moveTo(this.width-10,this.height/2);
+			thereforeLine.graphics.lineTo(this.width+100,this.height/2);
+			thereforeText = new Label;
+			thereforeText.x = this.gridY*25+this.width + 10; thereforeText.y = this.gridX*25+50;
+			parentMap.addElement(thereforeText);
+			thereforeText.text = "<== Therefore";
+			
+			var currInference:Inference = new Inference();
+			parentMap.addElement(currInference);
+			currInference.visible = false; currInference.argType.visible = false;
+			currInference.claim = this;
+			currInference.reasons.push(reason);
+			
+			currInference.connectionIDs.push(Inference.connections++);
+			
+			reason.inference = currInference;
+			
+			//create an invisible box for the inference rule corresponding to the claim
+			var tmpInput:DynamicTextArea = new DynamicTextArea();
+			parentMap.addElement(tmpInput);
+			//set the input box as invisible
+			tmpInput.visible = false;
+			//logical
+			//set the panel to which the input box belongs
+			tmpInput.panelReference = currInference;
+			//add a pointer to the input
+			currInference.input.push(tmpInput);		
+			
+			//binding
+			tmpInput.forwardList.push(currInference.input1);
+			input1.forwardList.push(currInference.input[0]);
+			
+			//set the id of the new text box to the id of the one in the reason
+			tmpInput.aid = input1.aid;
+			
+			
+			//create an invisible box for the reason
+			var tmpInput2:DynamicTextArea = new DynamicTextArea();
+			//set its id to the DTA's id present in the reason
+			tmpInput2.aid = reason.input1.aid;
+			parentMap.addElement(tmpInput2);
+			tmpInput2.visible = false;
+			tmpInput2.panelReference = currInference;
+			currInference.input.push(tmpInput2);	
+			
+			tmpInput2.forwardList.push(currInference.input1);
+			reason.input1.forwardList.push(tmpInput2);
+			input1.forwardUpdate();		//claim	
+			reason.input1.forwardUpdate();		//reason
+			
+			
+			// deactive the DONE button to avoid duplicate action
+			doneBtn.removeEventListener(MouseEvent.CLICK,doneHandler);
+			
 			}
 			*/
 		}

		{
			if(userEntered == false)
			{
					input1.text="";
					userEntered = true;
			}
			//trace("should make it editable");
			if( !( event.target is mx.controls.Button) )
			{
				input1.visible = true;

			panelType = ArgumentPanel.ARGUMENT_PANEL;			
			this.addEventListener(FlexEvent.CREATION_COMPLETE,onArgumentPanelCreate);	
			this.addEventListener(UpdateEvent.UPDATE_EVENT,adjustHeight);
			this.addEventListener(KeyboardEvent.KEY_DOWN,keyEntered);
			
			//will be set by the object that creates this
			inference = null;
			
