reworked pit smoothing and how the buffer is calculated