modified bash script