fixing functions.sh