Updating app.js to work with query operators