add buffer history tracking