Update global-functions.js