Wrap in anonymous function to avoid polluting global namespace