reverted shell script back to premerge version