public boolean insert(Point p) {
        if (!area.containsPoint(p))
            return false;

        if (size < MAX) {
            points[size] = p;
            size++;
            return true;
        }

        if (!isSubdivided())
            subdivide();

        if (nw.insert(p))
            return true;
        if (ne.insert(p))
            return true;
        if (sw.insert(p))
            return true;
        if (se.insert(p))
            return true;

        throw new IllegalStateException("Something odd happened when inserting " + p);
    }