wrote copy constructor