rename sampleWithReturn to sampleWithReplacement