struct generation script