rename copy function to eq function