change to #!/usr/bin/env bash. added more line breaks