partition works for uniform distribution