code for generating scripts running on local machine