fixed monitor.js to use the new main.js