use set -gx instead of -x to be able to use variables inside functions