update the script to meet some bash style rules