changed #!/bin/sh to #!/bin/bash