Need copy function to be declared as extern