correction script generation