copyData now exception safe