updated output scripts to handle generations