generalized with buffers