almost finished copy logic