Update globalfunctions.js