clean up the bash script a bit