Sampling

We also have this line in _randomSample, maybe factor out?