copying graph