opt by sampling for cluster