Nit: an explicit message about points.size() being 0 would be helpful