refinements on blockSampling for speed and readability