Update functions.sh

some vars updated