copy data buffer