Added code to global.js