tested basic random subsampling out of refactored functions