fixed sampleWithFactor