Update functions.sh
Update build