add copy ctor to buffer