this breaks if `points.size() == 0`?