early version of copy constructor working