private void addMissileToArray(Node missile, int index) {
		if (missile instanceof Element) {
			String id = missile.getAttributes().getNamedItem("id")
					.getNodeValue();
			switch (missile.getNodeName()) {
			case "missile":
				// case one it is a missile so need to add it to
				// missile list
				String destination = missile.getAttributes()
						.getNamedItem("destination").getNodeValue();
				String launchtime = missile.getAttributes()
						.getNamedItem("launchTime").getNodeValue();
				int lt = Integer.parseInt(launchtime);
				String flytime =missile.getAttributes()
						.getNamedItem("flyTime").getNodeValue();
				int ft = Integer.parseInt(flytime);
				String damage = missile.getAttributes()
						.getNamedItem("damage").getNodeValue();
				int dm = Integer.parseInt(damage);

				// get the launcher and add missile to it
				Launcher launcher = war.getMissileLaunchers().get(index / 2);				
				launcher.addMissile(id, destination , lt , ft ,dm );
				break;
			case "destructdMissile":
				// case 2 it is a missle to destruct missles need
				// to add to destructors list
				int destructAfterLaunch = Integer.parseInt(missile
						.getAttributes().getNamedItem("destructAfterLaunch")
						.getNodeValue());
				// get the destructor and then add missile destructor to it
				
				Destructor destructor_m = war.getMissileDestructors().get(index / 2);
				Missile target_m = WarUtility.getMissileById(id, war);
				int destruct_time = 10;
//				(int) (War.TAKES_TIME_MIN + (Math.random() * (War.TAKES_TIME_MAX
//						- War.TAKES_TIME_MIN + 1)));
				DestructedMissile destructedM = new DestructedMissile(destructAfterLaunch,target_m,destruct_time, destructor_m, destructor_m.getFileHandler(),controller.getWarListeners());
				destructor_m.addDestructMissile(destructedM);
				war.startMissileInterception(destructAfterLaunch, target_m.getMissileId(), destructor_m.getDestructorId());

			
				break;
			case "destructedLanucher":
				// case 3 it is a missle to destruct launchers need
				// to add to destructors list
				destructAfterLaunch = Integer.parseInt(missile.getAttributes()
						.getNamedItem("destructTime").getNodeValue());
				// get the destructor and then add missile launcher destructor
				// to it
				Destructor destructor_l = war.getMissileLauncherDestructors().get(index / 2);
				Launcher target_l = WarUtility.getLauncherById(id, war);
				destruct_time = 10;
//				(int) (War.TAKES_TIME_MIN + (Math.random() * (War.TAKES_TIME_MAX
//						- War.TAKES_TIME_MIN + 1)));
				DestructedLanucher destructedL = new DestructedLanucher(destructAfterLaunch,target_l, 
						destruct_time, destructor_l, destructor_l.getFileHandler(),controller.getWarListeners());
				destructor_l.addDestructMissile(destructedL);
				break;
			}
		}
	}