add buffer write