with some tests for copyto