updated the buffer