take out g in main.js