revised run.sh