public function hasChild($one, $two = null)
	{
		$hasChild = false;
		
		// if the first argument is an Element or an index
		$isOneElement = $one instanceof Element;
		$isOneIndex   = is_numeric($one) && is_int(+$one);
		if ($isOneElement || $isOneIndex) {
			// if the second argument is null, an Element, or an Index
			$isTwoNull    = $two === null;
			$isTwoElement = $two instanceof Element;
			$isTwoIndex   = is_numeric($two) && is_int(+$two);
			if ($isTwoNull || $isTwoElement || $isTwoIndex) {
				// decide what to do
				if ($isOneElement && $isTwoNull) {
					// return true if *the* element exists at *any* index
					$hasChild = $this->getChildIndex($one) !== false;
				} elseif ($isOneElement && $isTwoIndex) {
					// return true if *the* element exists at *the* index
					$hasChild = $this->getChildIndex($one) === $two;
				} elseif ($isOneIndex && $isTwoNull) {
					// return true if *any* element exists at *the* index
					$hasChild = array_key_exists($one, $this->children) 
						&& ! empty($this->children[$one]);
				} elseif ($isOneIndex && $isTwoElement) {
					// return true if *the* element exists at *the* index
					$hasChild = $this->getChildIndex($two) === $one;
				} else {
					throw new \BadMethodCallException(
						__METHOD__."() expects one or two parameters: an element, an index, or both "
							. "(in any order)"
					);
				}
			} else {
				throw new \InvalidArgumentException(
					__METHOD__."() expects parameter two to be null, Element, or integer"
				);
			}
		} else {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one to be an Element or integer"
			);
		}
		
		return $hasChild;
	}