simplify the shell scripts and make them easier to maintain going forward