better copy in and copy out