predefined the copy function