switched app.js to IIFE