wrap app code in an IIFE to avoid polluting global namespace