fixed a small bug regarding samples each refresh step(it was 4 instead of the variable sampleStep