public Node<E> addNode(Node<E> cur, int index,Node<E> newNode) throws IndexOutOfBoundsException
	{
		//check to make sure that the beginning or the end of the list 
		//has not been reached if the list is being iterated
		if(index > size)
		{
			throw new IndexOutOfBoundsException("index out of bounds");
		}
		
		
		if(index < 0)
		{
			return addNode(cur.last, index+1, newNode);
		}
		else if(index > 0)
		{
			return addNode(cur.next, index-1, newNode);
		}
		
		//if(index == 0)
		else
		{
			newNode.last = cur;
			newNode.next = cur.next;
			
			cur.next.last = newNode;
			cur.next = newNode;
			size++;
			return newNode;
		}
	}