added variable for smoothing factor and upped smoothing to 10