changing to bash from sh due to bashisms in the code aka. source