implement buffermode