added a deepCopy method to AttributesWithId