subsampling refactoring