expanded generation script