switched to bash for script to allow functions