Rewrote app.js for practice