implemented deepCopy