added comments and tidying up codes in bash script; added TO DO: