added local buffer-buffer copy