public void action() {

         ACLMessage msg = receive(MessageTemplate.MatchSender(controller));

         if (msg == null) { block(); return; }

	     if (msg.getPerformative() == ACLMessage.REQUEST){

		    try {
			   ContentElement content = getContentManager().extractContent(msg);
			   Concept concept = ((Action)content).getAction();

			   if (concept instanceof CloneAction){

				  CloneAction ca = (CloneAction)concept;
				  String newName = ca.getNewName();
				  Location l = ca.getMobileAgentDescription().getDestination();
				  if (l != null) destination = l;
				  doClone(destination, newName);
			   }
			   else if (concept instanceof MoveAction){

				  MoveAction ma = (MoveAction)concept;
				  Location l = ma.getMobileAgentDescription().getDestination();
				  if (l != null) doMove(destination = l);
			   }
			   else if (concept instanceof KillAgent){

				  myGui.setVisible(false);
				  myGui.dispose();
				  doDelete();
			   }
			}
			catch (Exception ex) { ex.printStackTrace(); }
		 }
		 else { System.out.println("Unexpected msg from controller agent"); }
	  }