Add a copy method which is required by operator overloading