public void add(int index, E element) throws IndexOutOfBoundsException
	{
		if(index > size || index < 0)
			throw new IndexOutOfBoundsException();
		int count;
		Node temp;
		if(index > size/2){
			count = size;
			temp = tail;
			while(--count >= index)
				temp = temp.prev;
		}
		else{
			count = -1;
			temp = head;
			while(++count <= index){
				temp = temp.next;
			}
		}
		Node n = new Node(element);
		n.next = temp;
		temp.prev.next = n;
		n.prev = temp.prev;
		temp.prev = n;
		size++;
	}