working on global.js