first version of copy script finished