move copyData to support class and add deep copy