Implemented the copy command