change samplefactor to samplesize