redoing main.js