change copy constructor to top level