public Traversal<T> getRest() {
		if (isEmpty()) {
			throw new UnsupportedOperationException(
			"Cannot advance to the rest of an empty data set"); // empty tree
		}

		if (leftBranch != null && !leftBranch.isEmpty()) {    // if there's non-empty left sub-tree
			Traversal<T> lbRest = leftBranch.getRest();          // get its elements but the first
			if (!lbRest.isEmpty()) {
				// construct resulting tree with the rest of elements in the left sub-tree and keeping
				// the node and right sub-tree intact
				return new BinarySearchTreeTr<T>((BinarySearchTreeTr<T>) lbRest, node, rightBranch);
			}
			else {
				// construct resulting tree with an empty left sub-tree and keeping
				// the node and right sub-tree intact
				return new BinarySearchTreeTr<T>(new BinarySearchTreeTr<T>(), node, rightBranch);
			}
		}
		else if (node != null) { // if the node is not empty
			return rightBranch;  // return the right sub-tree
		}
		else {
			return rightBranch.getRest();  // return all the elements of the right sub-tree but the first
		}
	}