DynamicModel copy function