set -x for debugging