script for generating then running line by line