subsampling test helper