shell

refactored shell script slightly