updated numSamples