fixed up the bash script