bash script now is now written properly