write scripts to generate