updated copy move logic