updated bash script codes