public int pop(){
		position--;
		int result = intarray[position];
		
		if(position < (intarray.length/4)){
			System.out.println("array size decreasing");
			int[] temparray = new int[(intarray.length/2)]; 
			for(int i=0; i<position; i++){
				temparray[i] = intarray[i];
			}
			intarray = temparray;
		}
		return result;
	}