copy and stat gen script