update scripts with use of environmental variables