copy constructor and comparison operator