edited main.js to include alerts