initialize writebuffer