fixed sub-sampling routine