implemented copy constructor