@Override
    public boolean add(E e)
    {
        if (e == null) {
            throw new IllegalArgumentException("Cannot add null element");
        }

        Node newNode = new Node(e);

        if (this.root == null) {
            this.root = newNode;
            this.size++;
            return true;
        }

        Node node = root;
        while(true) {
            // element already exists in tree
            if (e.compareTo(node.data) == 0) {
                return false;
            }

            // go left
            if (e.compareTo(node.data) < 0) {
                // add if at end of tree
                if (node.left == null) {
                    node.left = newNode;
                    newNode.parent = node;
                    break;
                }

                node = node.left;
            }

            // go right
            if (e.compareTo(node.data) > 0) {
                // add if at end of tree
                if (node.right == null) {
                    node.right = newNode;
                    newNode.parent = node;
                    break;
                }

                node = node.right;
            }
        }

        this.size++;
        return true;
    }