updated copy implementation