new version of sampleSplitting