Updated bash script