public void addAxesToDraw(List<Integer> userSelectedAxisList) {

		numSelected++;
		Axis[] currentAxes = getAxesFromList(currentDrawnList);
		Integer[] currentAxesArray = new Integer[currentDrawnList.size()+1];
		currentAxesArray= currentDrawnList.toArray(currentAxesArray);



		int firstAxis = userSelectedAxisList.get(0);
		int lastAxis =  userSelectedAxisList.get(userSelectedAxisList.size()-1);


		System.err.println("First axis  " +firstAxis);
		System.err.println("Last axis  " + lastAxis);

		if(numSelected==1)
			currentDrawnList =userSelectedAxisList;

		//		if(userSelectedAxisList.size()>2)
		//		{

		System.err.println(" current drawn list first " +currentDrawnList.get(0));
		System.err.println(" current drawn list last " +currentDrawnList.get(currentDrawnList.size()-1));



		if(currentAxesArray[0] == firstAxis){

			System.err.println(" First time *************************** 1 ");
			//currentDrawnList.add(lastAxis);
			int x = lastAxis;

			for(int i= currentAxesArray.length-1; i>0; i--)
			{

				currentAxesArray[i] = currentAxesArray[i-1];




			}
			currentAxesArray[0]= x;
			currentDrawnList =Arrays.asList(currentAxesArray);


		}

		else if(currentAxesArray[0] == lastAxis){

			System.err.println(" Second time *************************** 2 ");
			//currentDrawnList.add(firstAxis);
			int x = firstAxis;

			for(int i= currentAxesArray.length-1; i>0; i--)
			{

				currentAxesArray[i] = currentAxesArray[i-1];




			}
			currentAxesArray[0]= x;
			currentDrawnList =Arrays.asList(currentAxesArray);


		}


		else if(currentAxesArray[currentAxesArray.length-2] == lastAxis){
			currentAxesArray[currentAxesArray.length-1] = firstAxis;
			currentDrawnList =Arrays.asList(currentAxesArray);
			System.err.println(" Second time *************************** 3 ");


		}

		else if(currentAxesArray[currentAxesArray.length-2]== firstAxis){
			System.err.println(" Second time *************************** 4 ");
			currentAxesArray[currentAxesArray.length-1] = lastAxis;
			currentDrawnList =Arrays.asList(currentAxesArray);

		}


		Axis[] newAxes = getAxesFromList(currentDrawnList);
		updateCurrentAxes(newAxes);
		parallelDisplay.updateAxes(newAxes);


		//	}
		//		else{
		//
		//			Axis[] newAxes = getAxesFromList(userSelectedAxisList);
		//			updateCurrentAxes(newAxes);
		//			parallelDisplay.updateAxes(newAxes);
		//
		//
		//
		//		}


	}