unified the copy constructor and assignment